Changeset d4afaac for src/libcfa/concurrency/kernel
- Timestamp:
- May 30, 2018, 1:34:51 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, with_gc
- Children:
- cb7caf8
- Parents:
- 3530f39a (diff), 6c7099a (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/kernel
r3530f39a rd4afaac 43 43 extern struct cluster * mainCluster; 44 44 45 enum FinishOpCode { No_Action, Release, Schedule, Release_Schedule, Release_Multi, Release_Multi_Schedule }; 45 enum FinishOpCode { No_Action, Release, Schedule, Release_Schedule, Release_Multi, Release_Multi_Schedule, Callback }; 46 47 typedef void (*__finish_callback_fptr_t)(void); 46 48 47 49 //TODO use union, many of these fields are mutually exclusive (i.e. MULTI vs NOMULTI) 48 50 struct FinishAction { 49 51 FinishOpCode action_code; 52 /* 53 // Union of possible actions 54 union { 55 // Option 1 : locks and threads 56 struct { 57 // 1 thread or N thread 58 union { 59 thread_desc * thrd; 60 struct { 61 thread_desc ** thrds; 62 unsigned short thrd_count; 63 }; 64 }; 65 // 1 lock or N lock 66 union { 67 __spinlock_t * lock; 68 struct { 69 __spinlock_t ** locks; 70 unsigned short lock_count; 71 }; 72 }; 73 }; 74 // Option 2 : action pointer 75 __finish_callback_fptr_t callback; 76 }; 77 /*/ 50 78 thread_desc * thrd; 79 thread_desc ** thrds; 80 unsigned short thrd_count; 51 81 __spinlock_t * lock; 52 82 __spinlock_t ** locks; 53 83 unsigned short lock_count; 54 thread_desc ** thrds;55 unsigned short thrd_count;84 __finish_callback_fptr_t callback; 85 //*/ 56 86 }; 57 87 static inline void ?{}(FinishAction & this) {
Note: See TracChangeset
for help on using the changeset viewer.