- File:
-
- 1 edited
-
src/libcfa/concurrency/preemption.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/preemption.c
red235b6 r90c4df0 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 245 __kernel_sigaction( SIGUSR1, sigHandler_ctxSwitch, SA_SIGINFO | SA_RESTART); // CtxSwitch handler245 __kernel_sigaction( SIGUSR1, sigHandler_ctxSwitch, SA_SIGINFO ); // CtxSwitch handler 246 246 // __kernel_sigaction( SIGSEGV, sigHandler_segv , SA_SIGINFO ); // Failure handler 247 247 // __kernel_sigaction( SIGBUS , sigHandler_segv , SA_SIGINFO ); // Failure handler … … 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.