Changeset b1b63c31bdcf3823aa2a6479cda00bc5aee9624c
- Timestamp:
- 05/07/08 22:19:10
(4 months ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1210191550 +0300
- git-parent:
[ef33cb40a80a612b7ac8f3eb0f05e2b6cbec945c]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1210191550 +0300
- Message:
No need to take the structure lock when finding oneself
as we don't go through the object table and links.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| ref33cb4 |
rb1b63c3 |
|
| 743 | 743 | vlc_object_t *p_found; |
|---|
| 744 | 744 | |
|---|
| 745 | | vlc_mutex_lock( &structure_lock ); |
|---|
| 746 | | |
|---|
| 747 | | assert( vlc_internals( p_this )->i_refcount > 0 ); |
|---|
| 748 | | |
|---|
| 749 | 745 | /* If we are of the requested type ourselves, don't look further */ |
|---|
| 750 | 746 | if( !(i_mode & FIND_STRICT) && p_this->i_object_type == i_type ) |
|---|
| 751 | 747 | { |
|---|
| 752 | 748 | vlc_object_yield( p_this ); |
|---|
| 753 | | vlc_mutex_unlock( &structure_lock ); |
|---|
| 754 | 749 | return p_this; |
|---|
| 755 | 750 | } |
|---|
| | 751 | |
|---|
| | 752 | vlc_mutex_lock( &structure_lock ); |
|---|
| 756 | 753 | |
|---|
| 757 | 754 | /* Otherwise, recursively look for the object */ |
|---|
| … | … | |
| 796 | 793 | vlc_object_t *p_found; |
|---|
| 797 | 794 | |
|---|
| 798 | | vlc_mutex_lock( &structure_lock ); |
|---|
| 799 | | |
|---|
| 800 | 795 | /* If have the requested name ourselves, don't look further */ |
|---|
| 801 | 796 | if( !(i_mode & FIND_STRICT) |
|---|
| … | … | |
| 804 | 799 | { |
|---|
| 805 | 800 | vlc_object_yield( p_this ); |
|---|
| 806 | | vlc_mutex_unlock( &structure_lock ); |
|---|
| 807 | 801 | return p_this; |
|---|
| 808 | 802 | } |
|---|
| | 803 | |
|---|
| | 804 | vlc_mutex_lock( &structure_lock ); |
|---|
| 809 | 805 | |
|---|
| 810 | 806 | /* Otherwise, recursively look for the object */ |
|---|