Changeset e60e0dc for src/libcfa/concurrency/preemption.c
- Timestamp:
- Jul 17, 2017, 3:54:02 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 5bd0aad
- Parents:
- b706db1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/preemption.c
rb706db1 re60e0dc 66 66 67 67 void tick_preemption() { 68 alarm_list_t * alarms = & systemProcessor->alarms;68 alarm_list_t * alarms = &event_kernel->alarms; 69 69 __cfa_time_t currtime = __kernel_get_time(); 70 70 … … 189 189 } 190 190 191 static inline void defer_alarm() {192 systemProcessor->pending_alarm = true;193 }194 195 191 static void preempt( processor * this ) { 196 192 pthread_kill( this->kernel_thread, SIGUSR1 ); … … 236 232 this->proc = proc; 237 233 this->proc->preemption_alarm = &this->alarm; 238 update_preemption( this->proc, this->proc-> preemption );234 update_preemption( this->proc, this->proc->cltr->preemption ); 239 235 } 240 236 … … 283 279 case SI_KERNEL: 284 280 LIB_DEBUG_PRINT_SAFE("Kernel : Preemption thread tick\n"); 285 lock( & systemProcessor->alarm_lock DEBUG_CTX2 );281 lock( &event_kernel->lock DEBUG_CTX2 ); 286 282 tick_preemption(); 287 unlock( & systemProcessor->alarm_lock );283 unlock( &event_kernel->lock ); 288 284 break; 289 285 case SI_QUEUE:
Note: See TracChangeset
for help on using the changeset viewer.