Ignore:
Timestamp:
Nov 28, 2017, 3:04:37 PM (6 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:
4e7a4e6
Parents:
1393df07 (diff), 8a0a64d9 (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:/u/cforall/software/cfa/cfa-cc

File:
1 edited

Legend:

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

    r1393df07 rd5a52cc  
    164164
    165165void ?{}(cluster & this) {
    166         ( this.ready_queue ){};
     166        (this.ready_queue){};
    167167        ( this.ready_queue_lock ){};
    168168
     
    611611}
    612612
    613 //-----------------------------------------------------------------------------
    614 // Queues
    615 void ?{}( __thread_queue_t & this ) {
    616         this.head = NULL;
    617         this.tail = &this.head;
    618 }
    619 
    620 void append( __thread_queue_t & this, thread_desc * t ) {
    621         verify(this.tail != NULL);
    622         *this.tail = t;
    623         this.tail = &t->next;
    624 }
    625 
    626 thread_desc * pop_head( __thread_queue_t & this ) {
    627         thread_desc * head = this.head;
    628         if( head ) {
    629                 this.head = head->next;
    630                 if( !head->next ) {
    631                         this.tail = &this.head;
    632                 }
    633                 head->next = NULL;
    634         }
    635         return head;
    636 }
    637 
    638 thread_desc * remove( __thread_queue_t & this, thread_desc ** it ) {
    639         thread_desc * thrd = *it;
    640         verify( thrd );
    641 
    642         (*it) = thrd->next;
    643 
    644         if( this.tail == &thrd->next ) {
    645                 this.tail = it;
    646         }
    647 
    648         thrd->next = NULL;
    649 
    650         verify( (this.head == NULL) == (&this.head == this.tail) );
    651         verify( *this.tail == NULL );
    652         return thrd;
    653 }
    654 
    655 void ?{}( __condition_stack_t & this ) {
    656         this.top = NULL;
    657 }
    658 
    659 void push( __condition_stack_t & this, __condition_criterion_t * t ) {
    660         verify( !t->next );
    661         t->next = this.top;
    662         this.top = t;
    663 }
    664 
    665 __condition_criterion_t * pop( __condition_stack_t & this ) {
    666         __condition_criterion_t * top = this.top;
    667         if( top ) {
    668                 this.top = top->next;
    669                 top->next = NULL;
    670         }
    671         return top;
    672 }
    673 
    674613// Local Variables: //
    675614// mode: c //
Note: See TracChangeset for help on using the changeset viewer.