Changeset d384787 for libcfa/src/concurrency/kernel.cfa
- Timestamp:
- Apr 24, 2020, 1:54:29 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 0ea6c5a
- Parents:
- ecf6b46
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.cfa
recf6b46 rd384787 1004 1004 } 1005 1005 1006 bool V(semaphore & this, unsigned diff) with( this ) { 1007 $thread * thrd = 0p; 1008 lock( lock __cfaabi_dbg_ctx2 ); 1009 int release = max(-count, (int)diff); 1010 count += diff; 1011 for(release) { 1012 unpark( pop_head( waiting ) __cfaabi_dbg_ctx2 ); 1013 } 1014 1015 unlock( lock ); 1016 1017 return thrd != 0p; 1018 } 1019 1006 1020 //----------------------------------------------------------------------------- 1007 1021 // Global Queues
Note: See TracChangeset
for help on using the changeset viewer.