Changeset c84b4be for libcfa/src/concurrency/kernel.cfa
- Timestamp:
- Dec 13, 2019, 1:45:49 PM (5 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:
- 75ca7f4
- Parents:
- 983edfd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.cfa
r983edfd rc84b4be 556 556 557 557 with( *thrd->curr_cluster ) { 558 if(was_empty) {559 lock (proc_list_lock __cfaabi_dbg_ctx2);560 if(idles) {561 wake_fast(idles.head);562 }563 unlock (proc_list_lock);564 }565 else if( struct processor * idle = idles.head ) {566 wake_fast(idle);567 }558 // if(was_empty) { 559 // lock (proc_list_lock __cfaabi_dbg_ctx2); 560 // if(idles) { 561 // wake_fast(idles.head); 562 // } 563 // unlock (proc_list_lock); 564 // } 565 // else if( struct processor * idle = idles.head ) { 566 // wake_fast(idle); 567 // } 568 568 } 569 569 … … 825 825 //============================================================================================= 826 826 static void halt(processor * this) with( *this ) { 827 // verify( ! __atomic_load_n(&do_terminate, __ATOMIC_SEQ_CST) );828 829 with( *cltr ) {830 lock (proc_list_lock __cfaabi_dbg_ctx2);831 push_front(idles, *this);832 unlock (proc_list_lock);833 }834 835 __cfaabi_dbg_print_safe("Kernel : Processor %p ready to sleep\n", this);836 837 wait( idleLock );838 839 __cfaabi_dbg_print_safe("Kernel : Processor %p woke up and ready to run\n", this);840 841 with( *cltr ) {842 lock (proc_list_lock __cfaabi_dbg_ctx2);843 remove (idles, *this);844 unlock (proc_list_lock);845 }827 // // verify( ! __atomic_load_n(&do_terminate, __ATOMIC_SEQ_CST) ); 828 829 // with( *cltr ) { 830 // lock (proc_list_lock __cfaabi_dbg_ctx2); 831 // push_front(idles, *this); 832 // unlock (proc_list_lock); 833 // } 834 835 // __cfaabi_dbg_print_safe("Kernel : Processor %p ready to sleep\n", this); 836 837 // wait( idleLock ); 838 839 // __cfaabi_dbg_print_safe("Kernel : Processor %p woke up and ready to run\n", this); 840 841 // with( *cltr ) { 842 // lock (proc_list_lock __cfaabi_dbg_ctx2); 843 // remove (idles, *this); 844 // unlock (proc_list_lock); 845 // } 846 846 } 847 847
Note: See TracChangeset
for help on using the changeset viewer.