- File:
-
- 1 edited
-
libcfa/src/concurrency/kernel.hfa (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.hfa
r8cd5434 r431cd4f 49 49 50 50 // Processor id, required for scheduling threads 51 51 struct __processor_id_t { 52 unsigned id:24; 53 54 #if !defined(__CFA_NO_STATISTICS__) 55 struct __stats_t * stats; 56 #endif 57 }; 52 58 53 59 coroutine processorCtx_t { … … 57 63 // Wrapper around kernel threads 58 64 struct __attribute__((aligned(128))) processor { 65 // Main state 66 inline __processor_id_t; 67 59 68 // Cluster from which to get threads 60 69 struct cluster * cltr; … … 81 90 pthread_t kernel_thread; 82 91 83 // Unique id for the processor (not per cluster)84 unsigned unique_id;85 86 92 struct { 87 93 $io_context * ctx; … … 117 123 } init; 118 124 119 struct KernelThreadData * local_data;120 121 125 #if !defined(__CFA_NO_STATISTICS__) 122 126 int print_stats; … … 148 152 149 153 // Aligned timestamps which are used by the relaxed ready queue 150 struct __attribute__((aligned(128))) __timestamp_t { 151 volatile unsigned long long tv; 152 }; 153 154 static inline void ?{}(__timestamp_t & this) { this.tv = 0; } 155 static inline void ^?{}(__timestamp_t & this) {} 154 struct __attribute__((aligned(128))) __timestamp_t; 155 void ?{}(__timestamp_t & this); 156 void ^?{}(__timestamp_t & this); 156 157 157 158 //TODO adjust cache size to ARCHITECTURE … … 176 177 void ?{}(__ready_queue_t & this); 177 178 void ^?{}(__ready_queue_t & this); 178 #if !defined(__CFA_NO_STATISTICS__)179 unsigned cnt(const __ready_queue_t & this, unsigned idx);180 #endif181 179 182 180 // Idle Sleep
Note:
See TracChangeset
for help on using the changeset viewer.