Changeset 22226e4 for libcfa/src/concurrency/kernel.hfa
- Timestamp:
- Mar 18, 2022, 12:42:39 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
- Children:
- 0b4ddb71, 51239d1b
- Parents:
- 3bc69f2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.hfa
r3bc69f2 r22226e4 48 48 extern struct cluster * mainCluster; 49 49 50 // Processor id, required for scheduling threads 51 52 50 // Coroutine used py processors for the 2-step context switch 53 51 coroutine processorCtx_t { 54 52 struct processor * proc; 55 53 }; 56 54 57 55 struct io_future_t; 56 57 // Information needed for idle sleep 58 58 struct __fd_waitctx { 59 volatile int fd; 59 // semaphore/future like object 60 // values can be 0, 1 or some file descriptor. 61 // 0 - is the default state 62 // 1 - means the proc should wake-up immediately 63 // FD - means the proc is going asleep and should be woken by writing to the FD. 64 volatile int sem; 65 66 // The event FD that corresponds to this processor 67 int evfd; 68 69 // buffer into which the proc will read from evfd 70 // unused if not using io_uring for idle sleep 71 void * rdbuf; 72 73 // future use to track the read of the eventfd 74 // unused if not using io_uring for idle sleep 75 io_future_t * ftr; 60 76 }; 61 77 … … 103 119 bool pending_preemption; 104 120 105 // Idle lock (kernel semaphore) 106 int idle_fd; 107 108 // Idle waitctx 121 // context for idle sleep 109 122 struct __fd_waitctx idle_wctx; 110 123 … … 168 181 volatile unsigned id; 169 182 }; 170 171 // //TODO adjust cache size to ARCHITECTURE172 // // Structure holding the ready queue173 // struct __ready_queue_t {174 // // Data tracking the actual lanes175 // // On a seperate cacheline from the used struct since176 // // used can change on each push/pop but this data177 // // only changes on shrink/grow178 // struct {179 // // Arary of lanes180 // __intrusive_lane_t * volatile data;181 182 // __cache_id_t * volatile caches;183 184 // // Number of lanes (empty or not)185 // volatile size_t count;186 // } lanes;187 // };188 189 // void ?{}(__ready_queue_t & this);190 // void ^?{}(__ready_queue_t & this);191 183 192 184 // Idle Sleep
Note: See TracChangeset
for help on using the changeset viewer.