Ignore:
Timestamp:
Dec 13, 2019, 1:45:49 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
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
Message:

new ready queue seems to work but halting does not, had to be disabled

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/kernel.cfa

    r983edfd rc84b4be  
    556556
    557557        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                // }
    568568        }
    569569
     
    825825//=============================================================================================
    826826static 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        // }
    846846}
    847847
Note: See TracChangeset for help on using the changeset viewer.