Changeset b14ec5f for libcfa/src/concurrency/kernel.cfa
- Timestamp:
- Nov 19, 2021, 11:23:24 AM (9 months ago)
- Branches:
- enum, forall-pointer-decay, master, pthread-emulation
- Children:
- a633f6f
- Parents:
- 34b8cb7 (diff), 84a6e70 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.cfa
r34b8cb7 rb14ec5f 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 … … 212 212 213 213 // Push self to idle stack 214 mark_idle(this->cltr->procs, * this);214 if(!mark_idle(this->cltr->procs, * this)) continue MAIN_LOOP; 215 215 216 216 // Confirm the ready-queue is empty … … 330 330 // Push self to idle stack 331 331 ready_schedule_unlock(); 332 mark_idle(this->cltr->procs, * this);332 if(!mark_idle(this->cltr->procs, * this)) goto SEARCH; 333 333 ready_schedule_lock(); 334 334 … … 802 802 } 803 803 804 static voidmark_idle(__cluster_proc_list & this, processor & proc) {805 /* paranoid */ verify( ! __preemption_enabled() ); 806 lock( this );804 static bool mark_idle(__cluster_proc_list & this, processor & proc) { 805 /* paranoid */ verify( ! __preemption_enabled() ); 806 if(!try_lock( this )) return false; 807 807 this.idle++; 808 808 /* paranoid */ verify( this.idle <= this.total ); … … 813 813 unlock( this ); 814 814 /* paranoid */ verify( ! __preemption_enabled() ); 815 816 return true; 815 817 } 816 818
Note: See TracChangeset
for help on using the changeset viewer.