Changes in src/libcfa/concurrency/kernel.c [b158d8f:2e9aed4]
- File:
-
- 1 edited
-
src/libcfa/concurrency/kernel.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/kernel.c
rb158d8f r2e9aed4 242 242 void finishRunning(processor * this) { 243 243 if( this->finish.action_code == Release ) { 244 verify( disable_preempt_count > 1 ); 244 245 unlock( *this->finish.lock ); 245 246 } … … 248 249 } 249 250 else if( this->finish.action_code == Release_Schedule ) { 251 verify( disable_preempt_count > 1 ); 250 252 unlock( *this->finish.lock ); 251 253 ScheduleThread( this->finish.thrd ); 252 254 } 253 255 else if( this->finish.action_code == Release_Multi ) { 256 verify( disable_preempt_count > this->finish.lock_count ); 254 257 for(int i = 0; i < this->finish.lock_count; i++) { 255 258 unlock( *this->finish.locks[i] ); … … 257 260 } 258 261 else if( this->finish.action_code == Release_Multi_Schedule ) { 262 verify( disable_preempt_count > this->finish.lock_count ); 259 263 for(int i = 0; i < this->finish.lock_count; i++) { 260 264 unlock( *this->finish.locks[i] ); … … 363 367 this_processor->finish.lock = lock; 364 368 365 verify( disable_preempt_count > 0);369 verify( disable_preempt_count > 1 ); 366 370 suspend(); 367 371 verify( disable_preempt_count > 0 ); … … 391 395 this_processor->finish.thrd = thrd; 392 396 393 verify( disable_preempt_count > 0);397 verify( disable_preempt_count > 1 ); 394 398 suspend(); 395 399 verify( disable_preempt_count > 0 ); … … 516 520 } 517 521 522 //============================================================================================= 523 // Unexpected Terminating logic 524 //============================================================================================= 525 526 518 527 static __spinlock_t kernel_abort_lock; 519 528 static __spinlock_t kernel_debug_lock; … … 611 620 } 612 621 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 ) 613 655 // Local Variables: // 614 656 // mode: c //
Note:
See TracChangeset
for help on using the changeset viewer.