- File:
-
- 1 edited
-
libcfa/src/concurrency/kernel.cfa (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.cfa
rc33c2af r5f5a729 124 124 static void __wake_one(cluster * cltr); 125 125 126 static voidmark_idle (__cluster_proc_list & idles, processor & proc);126 static bool mark_idle (__cluster_proc_list & idles, processor & proc); 127 127 static void mark_awake(__cluster_proc_list & idles, processor & proc); 128 128 static [unsigned idle, unsigned total, * processor] query_idles( & __cluster_proc_list idles ); … … 213 213 214 214 // Push self to idle stack 215 mark_idle(this->cltr->procs, * this);215 if(!mark_idle(this->cltr->procs, * this)) continue MAIN_LOOP; 216 216 217 217 // Confirm the ready-queue is empty … … 331 331 // Push self to idle stack 332 332 ready_schedule_unlock(); 333 mark_idle(this->cltr->procs, * this);333 if(!mark_idle(this->cltr->procs, * this)) goto SEARCH; 334 334 ready_schedule_lock(); 335 335 … … 806 806 } 807 807 808 static voidmark_idle(__cluster_proc_list & this, processor & proc) {809 /* paranoid */ verify( ! __preemption_enabled() ); 810 lock( this );808 static bool mark_idle(__cluster_proc_list & this, processor & proc) { 809 /* paranoid */ verify( ! __preemption_enabled() ); 810 if(!try_lock( this )) return false; 811 811 this.idle++; 812 812 /* paranoid */ verify( this.idle <= this.total ); … … 815 815 unlock( this ); 816 816 /* paranoid */ verify( ! __preemption_enabled() ); 817 818 return true; 817 819 } 818 820
Note:
See TracChangeset
for help on using the changeset viewer.