- File:
-
- 1 edited
-
libcfa/src/concurrency/kernel.cfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.cfa
r038be32 r2d8f7b0 257 257 ready_queue{}; 258 258 ready_queue_lock{}; 259 260 #if !defined(__CFA_NO_STATISTICS__)261 print_stats = false;262 #endif263 259 264 260 procs{ __get }; … … 1008 1004 } 1009 1005 1010 bool V(semaphore & this, unsigned diff) with( this ) {1011 $thread * thrd = 0p;1012 lock( lock __cfaabi_dbg_ctx2 );1013 int release = max(-count, (int)diff);1014 count += diff;1015 for(release) {1016 unpark( pop_head( waiting ) __cfaabi_dbg_ctx2 );1017 }1018 1019 unlock( lock );1020 1021 return thrd != 0p;1022 }1023 1024 1006 //----------------------------------------------------------------------------- 1025 1007 // Global Queues
Note:
See TracChangeset
for help on using the changeset viewer.