- File:
-
- 1 edited
-
src/libcfa/concurrency/monitor.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/monitor.c
r348006f r2781e65 6 6 // file "LICENCE" distributed with Cforall. 7 7 // 8 // monitor_desc.c --8 // __monitor_t.c -- 9 9 // 10 10 // Author : Thierry Delisle … … 19 19 #include "kernel_private.h" 20 20 21 void enter( monitor_desc* this) {21 void enter(__monitor_t * this) { 22 22 lock( &this->lock ); 23 thread _desc* thrd = this_thread();23 thread * thrd = this_thread(); 24 24 25 25 if( !this->owner ) { … … 45 45 } 46 46 47 void leave( monitor_desc* this) {47 void leave(__monitor_t * this) { 48 48 lock( &this->lock ); 49 49 50 thread _desc* thrd = this_thread();50 thread * 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 _desc* new_owner = 0;57 thread * 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_desc** monitors, int count) {74 void enter(__monitor_t ** 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_desc** monitors, int count) {81 void leave(__monitor_t ** 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.