Changeset 37ba662 for libcfa/src/concurrency/kernel.hfa
- Timestamp:
- Jun 16, 2020, 3:32:00 PM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 04b5cef
- Parents:
- 2073d207
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.hfa
r2073d207 r37ba662 61 61 62 62 // Wrapper around kernel threads 63 struct processor { 63 struct __attribute__((aligned(128))) processor { 64 // Main state 64 65 inline __processor_id_t; 65 66 66 // Main state 67 // Cluster from which to get threads 68 struct cluster * cltr; 69 70 // Set to true to notify the processor should terminate 71 volatile bool do_terminate; 72 67 73 // Coroutine ctx who does keeps the state of the processor 68 74 struct processorCtx_t runner; 69 70 // Cluster from which to get threads71 struct cluster * cltr;72 75 73 76 // Name of the processor … … 90 93 // Idle lock (kernel semaphore) 91 94 __bin_sem_t idle; 92 93 // Termination94 // Set to true to notify the processor should terminate95 volatile bool do_terminate;96 95 97 96 // Termination synchronisation (user semaphore) … … 153 152 //TODO adjust cache size to ARCHITECTURE 154 153 // Structure holding the relaxed ready queue 155 struct __ attribute__((aligned(128))) __ready_queue_t {154 struct __ready_queue_t { 156 155 // Data tracking how many/which lanes are used 157 156 // Aligned to 128 for cache locality … … 162 161 // used can change on each push/pop but this data 163 162 // only changes on shrink/grow 164 struct __attribute__((aligned(64))){163 struct { 165 164 // Arary of lanes 166 165 __intrusive_lane_t * volatile data; … … 176 175 //----------------------------------------------------------------------------- 177 176 // Cluster 178 struct cluster {177 struct __attribute__((aligned(128))) cluster { 179 178 // Ready queue for threads 180 179 __ready_queue_t ready_queue;
Note: See TracChangeset
for help on using the changeset viewer.