- File:
-
- 1 edited
-
libcfa/src/concurrency/kernel.cfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.cfa
r2d8f7b0 r038be32 257 257 ready_queue{}; 258 258 ready_queue_lock{}; 259 260 #if !defined(__CFA_NO_STATISTICS__) 261 print_stats = false; 262 #endif 259 263 260 264 procs{ __get }; … … 1004 1008 } 1005 1009 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 1006 1024 //----------------------------------------------------------------------------- 1007 1025 // Global Queues
Note:
See TracChangeset
for help on using the changeset viewer.