Changeset 1fbab5a for src/libcfa/concurrency/monitor.c
- Timestamp:
- Mar 16, 2017, 4:50:08 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 395fc37, 64ac636, ef42b143
- Parents:
- 2f26687a (diff), d6d747d (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
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/monitor.c
r2f26687a r1fbab5a 6 6 // file "LICENCE" distributed with Cforall. 7 7 // 8 // __monitor_t.c --8 // monitor_desc.c -- 9 9 // 10 10 // Author : Thierry Delisle … … 19 19 #include "kernel_private.h" 20 20 21 void enter( __monitor_t* this) {21 void enter(monitor_desc * this) { 22 22 lock( &this->lock ); 23 thread * thrd = this_thread();23 thread_desc * thrd = this_thread(); 24 24 25 25 if( !this->owner ) { … … 45 45 } 46 46 47 void leave( __monitor_t* this) {47 void leave(monitor_desc * this) { 48 48 lock( &this->lock ); 49 49 50 thread * thrd = this_thread();50 thread_desc * thrd = this_thread(); 51 51 assert( thrd == this->owner ); 52 52 … … 55 55 56 56 //If we left the last level of recursion it means we are changing who owns the monitor 57 thread * new_owner = 0;57 thread_desc * new_owner = 0; 58 58 if( this->recursion == 0) { 59 59 //Get the next thread in the list … … 72 72 } 73 73 74 void enter( __monitor_t** monitors, int count) {74 void enter(monitor_desc ** monitors, int count) { 75 75 for(int i = 0; i < count; i++) { 76 76 // printf("%d\n", i); … … 79 79 } 80 80 81 void leave( __monitor_t** monitors, int count) {81 void leave(monitor_desc ** monitors, int count) { 82 82 for(int i = count - 1; i >= 0; i--) { 83 83 // printf("%d\n", i);
Note: See TracChangeset
for help on using the changeset viewer.