Ignore:
File:
1 edited

Legend:

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

    re235429 rbe73f30  
    4040        lock( lock __cfaabi_dbg_ctx2 );
    4141        if( is_locked ) {
    42                 append( blocked_threads, kernelTLS.this_thread );
     42                append( blocked_threads, active_thread() );
    4343                unlock( lock );
    4444                park();
     
    8686        lock( lock __cfaabi_dbg_ctx2 );
    8787        if( owner == 0p ) {
    88                 owner = kernelTLS.this_thread;
     88                owner = active_thread();
    8989                recursion_count = 1;
    9090                unlock( lock );
    9191        }
    92         else if( owner == kernelTLS.this_thread ) {
     92        else if( owner == active_thread() ) {
    9393                recursion_count++;
    9494                unlock( lock );
    9595        }
    9696        else {
    97                 append( blocked_threads, kernelTLS.this_thread );
     97                append( blocked_threads, active_thread() );
    9898                unlock( lock );
    9999                park();
     
    105105        lock( lock __cfaabi_dbg_ctx2 );
    106106        if( owner == 0p ) {
    107                 owner = kernelTLS.this_thread;
     107                owner = active_thread();
    108108                recursion_count = 1;
    109109                ret = true;
    110110        }
    111         else if( owner == kernelTLS.this_thread ) {
     111        else if( owner == active_thread() ) {
    112112                recursion_count++;
    113113                ret = true;
     
    159159void wait(condition_variable & this) {
    160160        lock( this.lock __cfaabi_dbg_ctx2 );
    161         append( this.blocked_threads, kernelTLS.this_thread );
     161        append( this.blocked_threads, active_thread() );
    162162        unlock( this.lock );
    163163        park();
     
    167167void wait(condition_variable & this, L & l) {
    168168        lock( this.lock __cfaabi_dbg_ctx2 );
    169         append( this.blocked_threads, kernelTLS.this_thread );
     169        append( this.blocked_threads, active_thread() );
    170170        unlock(l);
    171171        unlock(this.lock);
Note: See TracChangeset for help on using the changeset viewer.