Changeset 223a633 for libcfa/src/concurrency/monitor.cfa
- Timestamp:
- Oct 15, 2020, 3:41:38 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b9537e6
- Parents:
- 33c3ded (diff), 0b18db7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
libcfa/src/concurrency/monitor.cfa (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/monitor.cfa
r33c3ded r223a633 122 122 123 123 unlock( this->lock ); 124 park( __cfaabi_dbg_ctx);124 park(); 125 125 126 126 __cfaabi_dbg_print_safe( "Kernel : %10p Entered mon %p\n", thrd, this); … … 201 201 // Release the next thread 202 202 /* paranoid */ verifyf( urgent->owner->waiting_thread == this->owner, "Expected owner to be %p, got %p (r: %i, m: %p)", kernelTLS.this_thread, this->owner, this->recursion, this ); 203 unpark( urgent->owner->waiting_thread __cfaabi_dbg_ctx2);203 unpark( urgent->owner->waiting_thread ); 204 204 205 205 // Park current thread waiting 206 park( __cfaabi_dbg_ctx);206 park(); 207 207 208 208 // Some one was waiting for us, enter … … 222 222 223 223 // Park current thread waiting 224 park( __cfaabi_dbg_ctx);224 park(); 225 225 226 226 /* paranoid */ verifyf( kernelTLS.this_thread == this->owner, "Expected owner to be %p, got %p (r: %i, m: %p)", kernelTLS.this_thread, this->owner, this->recursion, this ); … … 264 264 //We need to wake-up the thread 265 265 /* paranoid */ verifyf( !new_owner || new_owner == this->owner, "Expected owner to be %p, got %p (m: %p)", new_owner, this->owner, this ); 266 unpark( new_owner __cfaabi_dbg_ctx2);266 unpark( new_owner ); 267 267 } 268 268 … … 493 493 // Wake the threads 494 494 for(int i = 0; i < thread_count; i++) { 495 unpark( threads[i] __cfaabi_dbg_ctx2);495 unpark( threads[i] ); 496 496 } 497 497 498 498 // Everything is ready to go to sleep 499 park( __cfaabi_dbg_ctx);499 park(); 500 500 501 501 // We are back, restore the owners and recursions … … 575 575 576 576 // unpark the thread we signalled 577 unpark( signallee __cfaabi_dbg_ctx2);577 unpark( signallee ); 578 578 579 579 //Everything is ready to go to sleep 580 park( __cfaabi_dbg_ctx);580 park(); 581 581 582 582 … … 679 679 680 680 // unpark the thread we signalled 681 unpark( next __cfaabi_dbg_ctx2);681 unpark( next ); 682 682 683 683 //Everything is ready to go to sleep 684 park( __cfaabi_dbg_ctx);684 park(); 685 685 686 686 // We are back, restore the owners and recursions … … 724 724 725 725 //Everything is ready to go to sleep 726 park( __cfaabi_dbg_ctx);726 park(); 727 727 728 728
Note:
See TracChangeset
for help on using the changeset viewer.