Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/preemption.c

    red235b6 r90c4df0  
    7171static pthread_t alarm_thread;                        // pthread handle to alarm thread
    7272
    73 void ?{}(event_kernel_t & this) {
    74         (this.alarms){};
    75         (this.lock){};
     73void ?{}(event_kernel_t * this) {
     74        (&this->alarms){};
     75        (&this->lock){};
    7676}
    7777
     
    240240        // Initialize the event kernel
    241241        event_kernel = (event_kernel_t *)&storage_event_kernel;
    242         (*event_kernel){};
     242        event_kernel{};
    243243
    244244        // Setup proper signal handlers
    245         __kernel_sigaction( SIGUSR1, sigHandler_ctxSwitch, SA_SIGINFO | SA_RESTART );         // CtxSwitch handler
     245        __kernel_sigaction( SIGUSR1, sigHandler_ctxSwitch, SA_SIGINFO );         // CtxSwitch handler
    246246        // __kernel_sigaction( SIGSEGV, sigHandler_segv     , SA_SIGINFO );      // Failure handler
    247247        // __kernel_sigaction( SIGBUS , sigHandler_segv     , SA_SIGINFO );      // Failure handler
     
    276276// Raii ctor/dtor for the preemption_scope
    277277// 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 ) {
     278void ?{}( 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
     286void ^?{}( preemption_scope * this ) {
    287287        disable_interrupts();
    288288
    289         update_preemption( this.proc, zero_time );
     289        update_preemption( this->proc, zero_time );
    290290}
    291291
Note: See TracChangeset for help on using the changeset viewer.