- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/mutex.cfa
r3381ed7 r121be3e 40 40 if( is_locked ) { 41 41 append( blocked_threads, kernelTLS.this_thread ); 42 unlock( lock ); 43 park(); 42 BlockInternal( &lock ); 44 43 } 45 44 else { … … 63 62 lock( this.lock __cfaabi_dbg_ctx2 ); 64 63 this.is_locked = (this.blocked_threads != 0); 65 unpark(64 WakeThread( 66 65 pop_head( this.blocked_threads ) 67 66 ); … … 95 94 else { 96 95 append( blocked_threads, kernelTLS.this_thread ); 97 unlock( lock ); 98 park(); 96 BlockInternal( &lock ); 99 97 } 100 98 } … … 123 121 owner = thrd; 124 122 recursion_count = (thrd ? 1 : 0); 125 unpark( thrd );123 WakeThread( thrd ); 126 124 } 127 125 unlock( lock ); … … 140 138 void notify_one(condition_variable & this) with(this) { 141 139 lock( lock __cfaabi_dbg_ctx2 ); 142 unpark(140 WakeThread( 143 141 pop_head( this.blocked_threads ) 144 142 ); … … 149 147 lock( lock __cfaabi_dbg_ctx2 ); 150 148 while(this.blocked_threads) { 151 unpark(149 WakeThread( 152 150 pop_head( this.blocked_threads ) 153 151 ); … … 159 157 lock( this.lock __cfaabi_dbg_ctx2 ); 160 158 append( this.blocked_threads, kernelTLS.this_thread ); 161 unlock( this.lock ); 162 park(); 159 BlockInternal( &this.lock ); 163 160 } 164 161 … … 167 164 lock( this.lock __cfaabi_dbg_ctx2 ); 168 165 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 ); 172 171 lock(l); 173 172 }
Note: See TracChangeset
for help on using the changeset viewer.