Ignore:
Timestamp:
Aug 25, 2017, 12:11:53 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
bf7b9da7
Parents:
135b431 (diff), f676b84 (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

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

    r135b431 r6b224a5  
    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
     
    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.