Changeset b8116cd


Ignore:
Timestamp:
Oct 2, 2017, 11:55:26 AM (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:
72ae87c
Parents:
549c006
Message:

Tested and fixed out-of-order waitfor of dtors

Location:
src
Files:
2 added
1 edited

Legend:

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

    r549c006 rb8116cd  
    158158                        LIB_DEBUG_PRINT_SAFE("Kernel :  mon accepts dtor, block and signal it \n");
    159159
     160                        // Wake the thread that is waiting for this
     161                        __condition_criterion_t * urgent = pop( &this->signal_stack );
     162                        verify( urgent );
     163
    160164                        // Reset mask
    161165                        reset_mask( this );
     
    165169
    166170                        // Some one else has the monitor, wait for him to finish and then run
    167                         BlockInternal( &this->lock );
     171                        BlockInternal( &this->lock, urgent->owner->waiting_thread );
    168172
    169173                        // Some one was waiting for us, enter
     
    551555                        *mask.accepted = index;
    552556                        if( mask.clauses[index].is_dtor ) {
     557                                LIB_DEBUG_PRINT_SAFE("Kernel : dtor already there\n");
    553558                                verifyf( mask.clauses[index].size == 1        , "ERROR: Accepted dtor has more than 1 mutex parameter." );
    554559
Note: See TracChangeset for help on using the changeset viewer.