Changeset 82f4063 for libcfa/src/concurrency/locks.hfa
- Timestamp:
- May 26, 2021, 10:38:19 AM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- bae0d35
- Parents:
- c65b930
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/locks.hfa
rc65b930 r82f4063 21 21 #include "bits/weakso_locks.hfa" 22 22 #include "containers/queueLockFree.hfa" 23 #include "containers/list.hfa" 23 24 24 25 #include "thread.hfa" … … 40 41 41 42 static inline bool P(Semaphore0nary & this, $thread * thrd) { 42 /* paranoid */ verify(! (thrd->seqable.next));43 /* paranoid */ verify(!( thrd`next));43 /* paranoid */ verify(!thrd`next); 44 /* paranoid */ verify(!(&(*thrd)`next)); 44 45 45 46 push(this.queue, thrd); … … 250 251 251 252 //----------------------------------------------------------------------------- 252 // info_thread253 // the info thread is a wrapper around a thread used254 // to store extra data for use in the condition variable253 // // info_thread 254 // // the info thread is a wrapper around a thread used 255 // // to store extra data for use in the condition variable 255 256 forall(L & | is_blocking_lock(L)) { 256 257 struct info_thread; 257 258 258 // for use by sequence259 info_thread(L) *& Back( info_thread(L) * this );260 info_thread(L) *& Next( info_thread(L) * this );259 // // for use by sequence 260 // info_thread(L) *& Back( info_thread(L) * this ); 261 // info_thread(L) *& Next( info_thread(L) * this ); 261 262 } 262 263 … … 269 270 270 271 // List of blocked threads 271 Sequence( info_thread(L) ) blocked_threads;272 dlist( info_thread(L) ) blocked_threads; 272 273 273 274 // Count of current blocked threads 274 275 int count; 275 276 }; 277 276 278 277 279 void ?{}( condition_variable(L) & this );
Note: See TracChangeset
for help on using the changeset viewer.