Changeset 1b033b8 for libcfa/src/concurrency/preemption.cfa
- Timestamp:
- Nov 13, 2020, 11:32:15 AM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- ac12f1f
- Parents:
- 0989e79
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/preemption.cfa
r0989e79 r1b033b8 393 393 // reserved for future use 394 394 static void timeout( $thread * this ) { 395 #if !defined( __CFA_NO_STATISTICS__ )396 kernelTLS().this_stats = this->curr_cluster->stats;397 #endif398 395 unpark( this ); 399 396 } … … 610 607 } 611 608 609 #if !defined(__CFA_NO_STATISTICS__) 610 int __print_alarm_stats = 0; 611 #endif 612 612 613 // Main of the alarm thread 613 614 // Waits on SIGALRM and send SIGUSR1 to whom ever needs it … … 617 618 id.id = doregister(&id); 618 619 __cfaabi_tls.this_proc_id = &id; 620 621 #if !defined(__CFA_NO_STATISTICS__) 622 struct __stats_t local_stats; 623 __cfaabi_tls.this_stats = &local_stats; 624 __init_stats( &local_stats ); 625 #endif 619 626 620 627 // Block sigalrms to control when they arrive … … 676 683 __cfaabi_dbg_print_safe( "Kernel : Preemption thread stopping\n" ); 677 684 unregister(&id); 685 686 #if !defined(__CFA_NO_STATISTICS__) 687 if( 0 != __print_alarm_stats ) { 688 __print_stats( &local_stats, __print_alarm_stats, "Alarm", "Thread", 0p ); 689 } 690 #endif 678 691 return 0p; 679 692 }
Note: See TracChangeset
for help on using the changeset viewer.