- File:
-
- 1 edited
-
libcfa/src/concurrency/mutex.cfa (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/mutex.cfa
r8dc8f68 red52dd5 12 12 // Created On : Fri May 25 01:37:11 2018 13 13 // Last Modified By : Peter A. Buhr 14 // Last Modified On : Thu Aug 21 22:35:44 202515 // Update Count : 414 // Last Modified On : Sun Feb 19 17:01:36 2023 15 // Update Count : 3 16 16 // 17 17 … … 131 131 //----------------------------------------------------------------------------- 132 132 // Conditions 133 void ?{}(cond _lock& this) {133 void ?{}(condition_variable & this) { 134 134 this.blocked_threads{}; 135 135 } 136 136 137 void ^?{}(cond _lock& this) {137 void ^?{}(condition_variable & this) { 138 138 // default 139 139 } 140 140 141 void notify_one(cond _lock& this) with(this) {141 void notify_one(condition_variable & this) with(this) { 142 142 lock( lock __cfaabi_dbg_ctx2 ); 143 143 unpark( … … 147 147 } 148 148 149 void notify_all(cond _lock& this) with(this) {149 void notify_all(condition_variable & this) with(this) { 150 150 lock( lock __cfaabi_dbg_ctx2 ); 151 151 while(this.blocked_threads) { … … 157 157 } 158 158 159 void wait(cond _lock& this) {159 void wait(condition_variable & this) { 160 160 lock( this.lock __cfaabi_dbg_ctx2 ); 161 161 append( this.blocked_threads, active_thread() ); … … 165 165 166 166 forall(L & | is_lock(L)) 167 void wait(cond _lock& this, L & l) {167 void wait(condition_variable & this, L & l) { 168 168 lock( this.lock __cfaabi_dbg_ctx2 ); 169 169 append( this.blocked_threads, active_thread() );
Note:
See TracChangeset
for help on using the changeset viewer.