Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/mutex.cfa

    r3381ed7 r121be3e  
    4040        if( is_locked ) {
    4141                append( blocked_threads, kernelTLS.this_thread );
    42                 unlock( lock );
    43                 park();
     42                BlockInternal( &lock );
    4443        }
    4544        else {
     
    6362        lock( this.lock __cfaabi_dbg_ctx2 );
    6463        this.is_locked = (this.blocked_threads != 0);
    65         unpark(
     64        WakeThread(
    6665                pop_head( this.blocked_threads )
    6766        );
     
    9594        else {
    9695                append( blocked_threads, kernelTLS.this_thread );
    97                 unlock( lock );
    98                 park();
     96                BlockInternal( &lock );
    9997        }
    10098}
     
    123121                owner = thrd;
    124122                recursion_count = (thrd ? 1 : 0);
    125                 unpark( thrd );
     123                WakeThread( thrd );
    126124        }
    127125        unlock( lock );
     
    140138void notify_one(condition_variable & this) with(this) {
    141139        lock( lock __cfaabi_dbg_ctx2 );
    142         unpark(
     140        WakeThread(
    143141                pop_head( this.blocked_threads )
    144142        );
     
    149147        lock( lock __cfaabi_dbg_ctx2 );
    150148        while(this.blocked_threads) {
    151                 unpark(
     149                WakeThread(
    152150                        pop_head( this.blocked_threads )
    153151                );
     
    159157        lock( this.lock __cfaabi_dbg_ctx2 );
    160158        append( this.blocked_threads, kernelTLS.this_thread );
    161         unlock( this.lock );
    162         park();
     159        BlockInternal( &this.lock );
    163160}
    164161
     
    167164        lock( this.lock __cfaabi_dbg_ctx2 );
    168165        append( this.blocked_threads, kernelTLS.this_thread );
    169         unlock(l);
    170         unlock(this.lock);
    171         park();
     166        void __unlock(void) {
     167                unlock(l);
     168                unlock(this.lock);
     169        }
     170        BlockInternal( __unlock );
    172171        lock(l);
    173172}
Note: See TracChangeset for help on using the changeset viewer.