- File:
-
- 1 edited
-
libcfa/src/concurrency/locks.hfa (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/locks.hfa
r6a8882c rf4e35326 49 49 //// Blocking Locks 50 50 /////////////////////////////////////////////////////////////////// 51 52 51 struct blocking_lock { 53 52 // Spin lock used for mutual exclusion … … 73 72 }; 74 73 75 struct single_acquisition_lock {74 struct mutex_lock { 76 75 inline blocking_lock; 77 76 }; … … 81 80 }; 82 81 83 struct multiple_acquisition_lock {82 struct recursive_mutex_lock { 84 83 inline blocking_lock; 85 84 }; … … 88 87 void ^?{}( blocking_lock & this ); 89 88 90 void ?{}( single_acquisition_lock & this );91 void ^?{}( single_acquisition_lock & this );89 void ?{}( mutex_lock & this ); 90 void ^?{}( mutex_lock & this ); 92 91 93 92 void ?{}( owner_lock & this ); 94 93 void ^?{}( owner_lock & this ); 95 94 96 void ?{}( multiple_acquisition_lock & this );97 void ^?{}( multiple_acquisition_lock & this );95 void ?{}( recursive_mutex_lock & this ); 96 void ^?{}( recursive_mutex_lock & this ); 98 97 99 98 void lock( blocking_lock & this ); … … 106 105 size_t get_recursion_count( blocking_lock & this ); 107 106 108 void lock( single_acquisition_lock & this );109 void unlock( single_acquisition_lock & this );110 void add_( single_acquisition_lock & this, struct $thread * t );111 void remove_( single_acquisition_lock & this );112 void set_recursion_count( single_acquisition_lock & this, size_t recursion );113 size_t get_recursion_count( single_acquisition_lock & this );107 void lock( mutex_lock & this ); 108 void unlock( mutex_lock & this ); 109 void add_( mutex_lock & this, struct $thread * t ); 110 void remove_( mutex_lock & this ); 111 void set_recursion_count( mutex_lock & this, size_t recursion ); 112 size_t get_recursion_count( mutex_lock & this ); 114 113 115 void lock( owner_lock & this ); 116 void unlock( owner_lock & this ); 117 void add_( owner_lock & this, struct $thread * t ); 118 void remove_( owner_lock & this ); 119 void set_recursion_count( owner_lock & this, size_t recursion ); 120 size_t get_recursion_count( owner_lock & this ); 121 122 void lock( multiple_acquisition_lock & this ); 123 void unlock( multiple_acquisition_lock & this ); 124 void add_( multiple_acquisition_lock & this, struct $thread * t ); 125 void remove_( multiple_acquisition_lock & this ); 126 void set_recursion_count( multiple_acquisition_lock & this, size_t recursion ); 127 size_t get_recursion_count( multiple_acquisition_lock & this ); 114 void lock( recursive_mutex_lock & this ); 115 void unlock( recursive_mutex_lock & this ); 116 void add_( recursive_mutex_lock & this, struct $thread * t ); 117 void remove_( recursive_mutex_lock & this ); 118 void set_recursion_count( recursive_mutex_lock & this, size_t recursion ); 119 size_t get_recursion_count( recursive_mutex_lock & this ); 128 120 129 121 ///////////////////////////////////////////////////////////////////
Note:
See TracChangeset
for help on using the changeset viewer.