Changeset e873838 for libcfa/src/concurrency/preemption.cfa
- Timestamp:
- Nov 2, 2020, 12:44:43 PM (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:
- 58688bf, 82f791f
- Parents:
- f7136f7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/preemption.cfa
rf7136f7 re873838 38 38 // FwdDeclarations : timeout handlers 39 39 static void preempt( processor * this ); 40 static void timeout( struct __processor_id_t * id,$thread * this );40 static void timeout( $thread * this ); 41 41 42 42 // FwdDeclarations : Signal handlers … … 91 91 92 92 // Tick one frame of the Discrete Event Simulation for alarms 93 static void tick_preemption( struct __processor_id_t * id) {93 static void tick_preemption(void) { 94 94 alarm_node_t * node = 0p; // Used in the while loop but cannot be declared in the while condition 95 95 alarm_list_t * alarms = &event_kernel->alarms; // Local copy for ease of reading … … 109 109 } 110 110 else { 111 timeout( id,node->thrd );111 timeout( node->thrd ); 112 112 } 113 113 … … 270 270 271 271 // reserved for future use 272 static void timeout( struct __processor_id_t * id,$thread * this ) {272 static void timeout( $thread * this ) { 273 273 #if !defined( __CFA_NO_STATISTICS__ ) 274 274 kernelTLS.this_stats = this->curr_cluster->stats; 275 275 #endif 276 __unpark( id,this );276 unpark( this ); 277 277 } 278 278 … … 413 413 id.full_proc = false; 414 414 id.id = doregister(&id); 415 kernelTLS.this_proc_id = &id; 415 416 416 417 // Block sigalrms to control when they arrive … … 458 459 // __cfaabi_dbg_print_safe( "Kernel : Preemption thread tick\n" ); 459 460 lock( event_kernel->lock __cfaabi_dbg_ctx2 ); 460 tick_preemption( &id);461 tick_preemption(); 461 462 unlock( event_kernel->lock ); 462 463 break;
Note: See TracChangeset
for help on using the changeset viewer.