Changeset 254ad1b for libcfa/src/concurrency/kernel.cfa
- Timestamp:
- Apr 24, 2021, 7:24:09 PM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- a76efc8, cfff639
- Parents:
- 734908c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.cfa
r734908c r254ad1b 349 349 if(unlikely(thrd_dst->preempted != __NO_PREEMPTION)) { 350 350 // The thread was preempted, reschedule it and reset the flag 351 __schedule_thread( thrd_dst );351 schedule_thread$( thrd_dst ); 352 352 break RUNNING; 353 353 } … … 439 439 /* paranoid */ verify( ! __preemption_enabled() ); 440 440 /* paranoid */ verify( kernelTLS().this_proc_id ); 441 /* paranoid */ verify( ready_schedule_islocked()); 441 442 /* paranoid */ verify( thrd ); 442 443 /* paranoid */ verify( thrd->state != Halted ); … … 457 458 struct cluster * cl = thrd->curr_cluster; 458 459 459 ready_schedule_lock(); 460 // push the thread to the cluster ready-queue 461 push( cl, thrd ); 462 463 // variable thrd is no longer safe to use 460 // push the thread to the cluster ready-queue 461 push( cl, thrd ); 462 463 // variable thrd is no longer safe to use 464 464 thrd = 0xdeaddeaddeaddeadp; 465 465 466 // wake the cluster using the save variable. 467 __wake_one( cl ); 468 ready_schedule_unlock(); 466 // wake the cluster using the save variable. 467 __wake_one( cl ); 469 468 470 469 #if !defined(__CFA_NO_STATISTICS__) … … 479 478 #endif 480 479 481 /* paranoid */ verify( ! __preemption_enabled() ); 480 /* paranoid */ verify( ready_schedule_islocked()); 481 /* paranoid */ verify( ! __preemption_enabled() ); 482 } 483 484 void schedule_thread$( $thread * thrd ) { 485 ready_schedule_lock(); 486 __schedule_thread( thrd ); 487 ready_schedule_unlock(); 482 488 } 483 489 … … 532 538 disable_interrupts(); 533 539 // Wake lost the race, 534 __schedule_thread( thrd );540 schedule_thread$( thrd ); 535 541 enable_interrupts(false); 536 542 }
Note: See TracChangeset
for help on using the changeset viewer.