Changeset ead8c7e for src/libcfa


Ignore:
Timestamp:
Feb 23, 2017, 4:30:42 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
24cde55, 51f3798
Parents:
3bb51e1
Message:

Remove extraenous asserts

Location:
src/libcfa/concurrency
Files:
2 edited

Legend:

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

    r3bb51e1 read8c7e  
    456456
    457457void append( simple_thread_list * this, thread * t ) {
    458         assert( t->next == NULL );
    459458        assert(this->tail != NULL);
    460459        *this->tail = t;
    461460        this->tail = &t->next;
    462         assert(this->tail != NULL);
    463461}
    464462
    465463thread * pop_head( simple_thread_list * this ) {
    466         assert(this->tail != NULL);
    467464        thread * head = this->head;
    468465        if( head ) {
     
    473470                head->next = NULL;
    474471        }       
    475         assert(this->tail != NULL);
    476472        return head;
    477473}
  • src/libcfa/concurrency/monitor.c

    r3bb51e1 read8c7e  
    2323        thread * thrd = this_thread();
    2424
    25         assert( this->entry_queue.tail != NULL );
    26 
    2725        if( this->holder ) {
    2826                append( &this->entry_queue, thrd );
     
    3432        }
    3533
    36         assert( this->entry_queue.tail != NULL );       
    37 
    3834        unlock( &this->lock );
    3935}
     
    4238        lock( &this->lock );
    4339
    44         assert( this->entry_queue.tail != NULL );       
    45 
    4640        thread * thrd = this_thread();
    4741        assert( thrd == this->holder );
     
    4943        this->holder = pop_head( &this->entry_queue );
    5044
    51         assert( this->entry_queue.tail != NULL );       
    52 
    5345        unlock( &this->lock );
    5446        if( this->holder ) ScheduleThread( this->holder );
Note: See TracChangeset for help on using the changeset viewer.