Ignore:
Timestamp:
Jul 18, 2017, 4:35:52 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
f19339e
Parents:
795d450
Message:

Convert more library files to use references

File:
1 edited

Legend:

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

    r795d450 r242a902  
    140140}
    141141
    142 void ?{}( monitor_guard_t * this, monitor_desc ** m, int count ) {
    143         this->m = m;
    144         this->count = count;
    145         qsort(this->m, count);
    146         enter( this->m, this->count );
    147 
    148         this->prev_mntrs = this_thread->current_monitors;
    149         this->prev_count = this_thread->current_monitor_count;
     142void ?{}( monitor_guard_t & this, monitor_desc ** m, int count ) {
     143        this.m = m;
     144        this.count = count;
     145        qsort(this.m, count);
     146        enter( this.m, this.count );
     147
     148        this.prev_mntrs = this_thread->current_monitors;
     149        this.prev_count = this_thread->current_monitor_count;
    150150
    151151        this_thread->current_monitors      = m;
     
    153153}
    154154
    155 void ^?{}( monitor_guard_t * this ) {
    156         leave( this->m, this->count );
    157 
    158         this_thread->current_monitors      = this->prev_mntrs;
    159         this_thread->current_monitor_count = this->prev_count;
    160 }
    161 
    162 void ?{}(__condition_node_t * this, thread_desc * waiting_thread, unsigned short count, uintptr_t user_info ) {
    163         this->waiting_thread = waiting_thread;
    164         this->count = count;
    165         this->next = NULL;
    166         this->user_info = user_info;
    167 }
    168 
    169 void ?{}(__condition_criterion_t * this ) {
    170         this->ready  = false;
    171         this->target = NULL;
    172         this->owner  = NULL;
    173         this->next   = NULL;
    174 }
    175 
    176 void ?{}(__condition_criterion_t * this, monitor_desc * target, __condition_node_t * owner ) {
    177         this->ready  = false;
    178         this->target = target;
    179         this->owner  = owner;
    180         this->next   = NULL;
     155void ^?{}( monitor_guard_t & this ) {
     156        leave( this.m, this.count );
     157
     158        this_thread->current_monitors      = this.prev_mntrs;
     159        this_thread->current_monitor_count = this.prev_count;
     160}
     161
     162void ?{}(__condition_node_t & this, thread_desc * waiting_thread, unsigned short count, uintptr_t user_info ) {
     163        this.waiting_thread = waiting_thread;
     164        this.count = count;
     165        this.next = NULL;
     166        this.user_info = user_info;
     167}
     168
     169void ?{}(__condition_criterion_t & this ) {
     170        this.ready  = false;
     171        this.target = NULL;
     172        this.owner  = NULL;
     173        this.next   = NULL;
     174}
     175
     176void ?{}(__condition_criterion_t & this, monitor_desc * target, __condition_node_t * owner ) {
     177        this.ready  = false;
     178        this.target = target;
     179        this.owner  = owner;
     180        this.next   = NULL;
    181181}
    182182
     
    506506}
    507507
    508 void ?{}( __condition_blocked_queue_t * this ) {
    509         this->head = NULL;
    510         this->tail = &this->head;
     508void ?{}( __condition_blocked_queue_t & this ) {
     509        this.head = NULL;
     510        this.tail = &this.head;
    511511}
    512512
Note: See TracChangeset for help on using the changeset viewer.