Changes in src/libcfa/concurrency/kernel [09800e9:a1a17a74]
- File:
-
- 1 edited
-
src/libcfa/concurrency/kernel (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/kernel
r09800e9 ra1a17a74 43 43 extern struct cluster * mainCluster; 44 44 45 enum FinishOpCode { No_Action, Release, Schedule, Release_Schedule, Release_Multi, Release_Multi_Schedule, Callback }; 46 47 typedef void (*__finish_callback_fptr_t)(void); 45 enum FinishOpCode { No_Action, Release, Schedule, Release_Schedule, Release_Multi, Release_Multi_Schedule }; 48 46 49 47 //TODO use union, many of these fields are mutually exclusive (i.e. MULTI vs NOMULTI) 50 48 struct FinishAction { 51 49 FinishOpCode action_code; 52 /*53 // Union of possible actions54 union {55 // Option 1 : locks and threads56 struct {57 // 1 thread or N thread58 union {59 thread_desc * thrd;60 struct {61 thread_desc ** thrds;62 unsigned short thrd_count;63 };64 };65 // 1 lock or N lock66 union {67 __spinlock_t * lock;68 struct {69 __spinlock_t ** locks;70 unsigned short lock_count;71 };72 };73 };74 // Option 2 : action pointer75 __finish_callback_fptr_t callback;76 };77 /*/78 50 thread_desc * thrd; 79 thread_desc ** thrds;80 unsigned short thrd_count;81 51 __spinlock_t * lock; 82 52 __spinlock_t ** locks; 83 53 unsigned short lock_count; 84 __finish_callback_fptr_t callback;85 //*/54 thread_desc ** thrds; 55 unsigned short thrd_count; 86 56 }; 87 57 static inline void ?{}(FinishAction & this) {
Note:
See TracChangeset
for help on using the changeset viewer.