Changeset 28e58fd for src/libcfa/concurrency/preemption.c
- Timestamp:
- Aug 25, 2017, 10:38:34 AM (8 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:
- 800d275
- Parents:
- af08051 (diff), 3eab308c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/preemption.c
raf08051 r28e58fd 71 71 static pthread_t alarm_thread; // pthread handle to alarm thread 72 72 73 void ?{}(event_kernel_t *this) {74 ( &this->alarms){};75 ( &this->lock){};73 void ?{}(event_kernel_t & this) { 74 (this.alarms){}; 75 (this.lock){}; 76 76 } 77 77 … … 240 240 // Initialize the event kernel 241 241 event_kernel = (event_kernel_t *)&storage_event_kernel; 242 event_kernel{};242 (*event_kernel){}; 243 243 244 244 // Setup proper signal handlers … … 276 276 // Raii ctor/dtor for the preemption_scope 277 277 // Used by thread to control when they want to receive preemption signals 278 void ?{}( preemption_scope *this, processor * proc ) {279 ( &this->alarm){ proc, zero_time, zero_time };280 this ->proc = proc;281 this ->proc->preemption_alarm = &this->alarm;282 283 update_preemption( this ->proc, from_us(this->proc->cltr->preemption) );284 } 285 286 void ^?{}( preemption_scope *this ) {278 void ?{}( preemption_scope & this, processor * proc ) { 279 (this.alarm){ proc, zero_time, zero_time }; 280 this.proc = proc; 281 this.proc->preemption_alarm = &this.alarm; 282 283 update_preemption( this.proc, from_us(this.proc->cltr->preemption) ); 284 } 285 286 void ^?{}( preemption_scope & this ) { 287 287 disable_interrupts(); 288 288 289 update_preemption( this ->proc, zero_time );289 update_preemption( this.proc, zero_time ); 290 290 } 291 291
Note:
See TracChangeset
for help on using the changeset viewer.