- Timestamp:
- Aug 22, 2017, 1:48:07 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:
- 3eab0ef6
- Parents:
- 90c4df0
- Location:
- src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/invoke.h
r90c4df0 r80c72a7 94 94 unsigned short acceptable_count; // number of acceptable functions 95 95 short accepted_index; // the index of the accepted function, -1 if none 96 fptr_t pre_accept; // function to run before an accept97 96 }; 98 97 -
src/libcfa/concurrency/monitor
r90c4df0 r80c72a7 31 31 this->acceptable_count = 0; 32 32 this->accepted_index = -1; 33 this->pre_accept = 0;34 33 } 35 34 … … 104 103 unsigned short count; 105 104 monitor_desc ** monitors; 106 bool run_preaccept;107 105 }; 108 106 -
src/libcfa/concurrency/monitor.c
r90c4df0 r80c72a7 182 182 __enter_monitor_desc( monitors[i], monitors, count, func ); 183 183 } 184 185 int acc_idx = monitors[0]->accepted_index;186 if( acc_idx >= 0 && monitors[0]->acceptables[ acc_idx ].run_preaccept ) {187 assert( monitors[0]->pre_accept );188 monitors[0]->pre_accept();189 }190 184 } 191 185 -
src/tests/sched-ext.c
r90c4df0 r80c72a7 44 44 acceptable.count = 1; 45 45 acceptable.monitors = &a; 46 acceptable.run_preaccept = false;47 46 48 47 __accept_internal( 1, &acceptable );
Note: See TracChangeset
for help on using the changeset viewer.