Ignore:
Timestamp:
Feb 23, 2017, 4:24:35 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, 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:
3bb51e1
Parents:
485fdcf
Message:

Basic monitor implementation

File:
1 edited

Legend:

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

    r485fdcf rf07e037  
    457457void append( simple_thread_list * this, thread * t ) {
    458458        assert( t->next == NULL );
     459        assert(this->tail != NULL);
    459460        *this->tail = t;
    460461        this->tail = &t->next;
     462        assert(this->tail != NULL);
    461463}
    462464
    463465thread * pop_head( simple_thread_list * this ) {
     466        assert(this->tail != NULL);
    464467        thread * head = this->head;
    465468        if( head ) {
     
    470473                head->next = NULL;
    471474        }       
    472        
     475        assert(this->tail != NULL);
    473476        return head;
    474477}
Note: See TracChangeset for help on using the changeset viewer.