- File:
-
- 1 edited
-
libcfa/src/concurrency/kernel.hfa (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.hfa
rf6660520 r2d8f7b0 40 40 void P (semaphore & this); 41 41 bool V (semaphore & this); 42 bool V (semaphore & this, unsigned count);43 42 44 43 … … 136 135 // Like head/tail but not seen by the kernel 137 136 volatile uint32_t alloc; 138 volatile uint32_t ready;139 137 140 138 __spinlock_t lock; … … 146 144 void * ring_ptr; 147 145 size_t ring_sz; 148 149 // Statistics150 #if !defined(__CFA_NO_STATISTICS__)151 struct {152 struct {153 unsigned long long int val;154 unsigned long long int cnt;155 } submit_avg;156 } stats;157 #endif158 146 }; 159 147 … … 176 164 void * ring_ptr; 177 165 size_t ring_sz; 178 179 // Statistics 180 #if !defined(__CFA_NO_STATISTICS__) 181 struct { 182 struct { 183 unsigned long long int val; 184 unsigned long long int cnt; 185 } completed_avg; 186 } stats; 187 #endif 188 }; 189 190 #if defined(__CFA_IO_POLLING_USER__) 191 struct __io_poller_fast { 192 struct io_ring * ring; 193 $thread thrd; 194 }; 195 #endif 166 }; 196 167 197 168 struct io_ring { … … 200 171 uint32_t flags; 201 172 int fd; 173 pthread_t poller; 174 void * stack; 175 volatile bool done; 202 176 semaphore submit; 203 volatile bool done;204 struct {205 struct {206 void * stack;207 pthread_t kthrd;208 } slow;209 #if defined(__CFA_IO_POLLING_USER__)210 __io_poller_fast fast;211 __bin_sem_t sem;212 #endif213 } poller;214 177 }; 215 178 #endif … … 250 213 struct io_ring io; 251 214 #endif 252 253 #if !defined(__CFA_NO_STATISTICS__)254 bool print_stats;255 #endif256 215 }; 257 216 extern Duration default_preemption(); … … 268 227 static inline struct processor * active_processor() { return TL_GET( this_processor ); } // UNSAFE 269 228 static inline struct cluster * active_cluster () { return TL_GET( this_processor )->cltr; } 270 271 #if !defined(__CFA_NO_STATISTICS__)272 static inline void print_stats_at_exit( cluster & this ) {273 this.print_stats = true;274 }275 #endif276 229 277 230 // Local Variables: //
Note:
See TracChangeset
for help on using the changeset viewer.