Changeset be73f30 for libcfa/src/concurrency/mutex.cfa
- Timestamp:
- Nov 5, 2020, 9:44:23 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 3959595
- Parents:
- e1d6c8dd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/mutex.cfa
re1d6c8dd rbe73f30 40 40 lock( lock __cfaabi_dbg_ctx2 ); 41 41 if( is_locked ) { 42 append( blocked_threads, kernelTLS.this_thread);42 append( blocked_threads, active_thread() ); 43 43 unlock( lock ); 44 44 park(); … … 86 86 lock( lock __cfaabi_dbg_ctx2 ); 87 87 if( owner == 0p ) { 88 owner = kernelTLS.this_thread;88 owner = active_thread(); 89 89 recursion_count = 1; 90 90 unlock( lock ); 91 91 } 92 else if( owner == kernelTLS.this_thread) {92 else if( owner == active_thread() ) { 93 93 recursion_count++; 94 94 unlock( lock ); 95 95 } 96 96 else { 97 append( blocked_threads, kernelTLS.this_thread);97 append( blocked_threads, active_thread() ); 98 98 unlock( lock ); 99 99 park(); … … 105 105 lock( lock __cfaabi_dbg_ctx2 ); 106 106 if( owner == 0p ) { 107 owner = kernelTLS.this_thread;107 owner = active_thread(); 108 108 recursion_count = 1; 109 109 ret = true; 110 110 } 111 else if( owner == kernelTLS.this_thread) {111 else if( owner == active_thread() ) { 112 112 recursion_count++; 113 113 ret = true; … … 159 159 void wait(condition_variable & this) { 160 160 lock( this.lock __cfaabi_dbg_ctx2 ); 161 append( this.blocked_threads, kernelTLS.this_thread);161 append( this.blocked_threads, active_thread() ); 162 162 unlock( this.lock ); 163 163 park(); … … 167 167 void wait(condition_variable & this, L & l) { 168 168 lock( this.lock __cfaabi_dbg_ctx2 ); 169 append( this.blocked_threads, kernelTLS.this_thread);169 append( this.blocked_threads, active_thread() ); 170 170 unlock(l); 171 171 unlock(this.lock);
Note: See TracChangeset
for help on using the changeset viewer.