Changeset 6a8882c for libcfa/src/concurrency/locks.hfa
- Timestamp:
- Nov 11, 2020, 2:39:48 PM (2 years ago)
- Branches:
- arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 21255675
- Parents:
- 836c9925
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/locks.hfa
r836c9925 r6a8882c 49 49 //// Blocking Locks 50 50 /////////////////////////////////////////////////////////////////// 51 51 52 struct blocking_lock { 52 53 // Spin lock used for mutual exclusion … … 72 73 }; 73 74 74 struct mutex_lock {75 struct single_acquisition_lock { 75 76 inline blocking_lock; 76 77 }; … … 80 81 }; 81 82 82 struct recursive_mutex_lock {83 struct multiple_acquisition_lock { 83 84 inline blocking_lock; 84 85 }; … … 87 88 void ^?{}( blocking_lock & this ); 88 89 89 void ?{}( mutex_lock & this );90 void ^?{}( mutex_lock & this );90 void ?{}( single_acquisition_lock & this ); 91 void ^?{}( single_acquisition_lock & this ); 91 92 92 93 void ?{}( owner_lock & this ); 93 94 void ^?{}( owner_lock & this ); 94 95 95 void ?{}( recursive_mutex_lock & this );96 void ^?{}( recursive_mutex_lock & this );96 void ?{}( multiple_acquisition_lock & this ); 97 void ^?{}( multiple_acquisition_lock & this ); 97 98 98 99 void lock( blocking_lock & this ); … … 105 106 size_t get_recursion_count( blocking_lock & this ); 106 107 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 );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 ); 113 114 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 ); 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 ); 120 128 121 129 ///////////////////////////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.