Ignore:
File:
1 edited

Legend:

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

    r2e9aed4 rb158d8f  
    242242void finishRunning(processor * this) {
    243243        if( this->finish.action_code == Release ) {
    244                 verify( disable_preempt_count > 1 );
    245244                unlock( *this->finish.lock );
    246245        }
     
    249248        }
    250249        else if( this->finish.action_code == Release_Schedule ) {
    251                 verify( disable_preempt_count > 1 );
    252250                unlock( *this->finish.lock );
    253251                ScheduleThread( this->finish.thrd );
    254252        }
    255253        else if( this->finish.action_code == Release_Multi ) {
    256                 verify( disable_preempt_count > this->finish.lock_count );
    257254                for(int i = 0; i < this->finish.lock_count; i++) {
    258255                        unlock( *this->finish.locks[i] );
     
    260257        }
    261258        else if( this->finish.action_code == Release_Multi_Schedule ) {
    262                 verify( disable_preempt_count > this->finish.lock_count );
    263259                for(int i = 0; i < this->finish.lock_count; i++) {
    264260                        unlock( *this->finish.locks[i] );
     
    367363        this_processor->finish.lock = lock;
    368364
    369         verify( disable_preempt_count > 1 );
     365        verify( disable_preempt_count > 0 );
    370366        suspend();
    371367        verify( disable_preempt_count > 0 );
     
    395391        this_processor->finish.thrd = thrd;
    396392
    397         verify( disable_preempt_count > 1 );
     393        verify( disable_preempt_count > 0 );
    398394        suspend();
    399395        verify( disable_preempt_count > 0 );
     
    519515        __cfaabi_dbg_print_safe("Kernel : Shutdown complete\n");
    520516}
    521 
    522 //=============================================================================================
    523 // Unexpected Terminating logic
    524 //=============================================================================================
    525 
    526517
    527518static __spinlock_t kernel_abort_lock;
     
    620611}
    621612
    622 //-----------------------------------------------------------------------------
    623 // Debug
    624 __cfaabi_dbg_debug_do(
    625         struct {
    626                 thread_desc * tail;
    627         } __cfaabi_dbg_thread_list = { NULL };
    628 
    629         void __cfaabi_dbg_thread_register( thread_desc * thrd ) {
    630                 if( !__cfaabi_dbg_thread_list.tail ) {
    631                         __cfaabi_dbg_thread_list.tail = thrd;
    632                         return;
    633                 }
    634                 __cfaabi_dbg_thread_list.tail->dbg_next = thrd;
    635                 thrd->dbg_prev = __cfaabi_dbg_thread_list.tail;
    636                 __cfaabi_dbg_thread_list.tail = thrd;
    637         }
    638 
    639         void __cfaabi_dbg_thread_unregister( thread_desc * thrd ) {
    640                 thread_desc * prev = thrd->dbg_prev;
    641                 thread_desc * next = thrd->dbg_next;
    642 
    643                 if( next ) { next->dbg_prev = prev; }
    644                 else       {
    645                         assert( __cfaabi_dbg_thread_list.tail == thrd );
    646                         __cfaabi_dbg_thread_list.tail = prev;
    647                 }
    648 
    649                 if( prev ) { prev->dbg_next = next; }
    650 
    651                 thrd->dbg_prev = NULL;
    652                 thrd->dbg_next = NULL;
    653         }
    654 )
    655613// Local Variables: //
    656614// mode: c //
Note: See TracChangeset for help on using the changeset viewer.