Changeset aaa4f93 for src/libcfa/concurrency
- Timestamp:
- Sep 21, 2017, 11:33:23 AM (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:
- 7453a68
- Parents:
- a2dbad10
- Location:
- src/libcfa/concurrency
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/monitor
ra2dbad10 raaa4f93 105 105 106 106 struct __acceptable_t { 107 __monitor_group_t monitors;107 __monitor_group_t; 108 108 bool is_dtor; 109 109 }; -
src/libcfa/concurrency/monitor.c
ra2dbad10 raaa4f93 280 280 lock_all( monitors, locks, count ); 281 281 282 // DON'T unlock, ask the kernel to do it283 284 // Save monitor state285 save_recursion( monitors, recursions, count );286 287 282 // Find the next thread(s) to run 288 283 unsigned short thread_count = 0; … … 297 292 thread_count = insert_unique( threads, thread_count, new_owner ); 298 293 } 294 295 // Save monitor state 296 save_recursion( monitors, recursions, count ); 299 297 300 298 // Everything is ready to go to sleep … … 634 632 // For all acceptable functions check if this is the current function. 635 633 for( short i = 0; i < count; i++, it++ ) { 636 if( it->monitors== group ) {634 if( *it == group ) { 637 635 *this->mask.accepted = i; 638 636 return true; … … 658 656 for( __acceptable_t * it = mask.clauses; it != end; it++, i++ ) { 659 657 // Check if we have a match 660 if( it->monitors== (*thrd_it)->monitors ) {658 if( *it == (*thrd_it)->monitors ) { 661 659 662 660 // If we have a match return it … … 673 671 short max = 0; 674 672 for( int i = 0; i < mask.size; i++ ) { 675 max += mask.clauses[i]. monitors.size;673 max += mask.clauses[i].size; 676 674 } 677 675 return max;
Note: See TracChangeset
for help on using the changeset viewer.