Changeset fe9468e2
- Timestamp:
- Dec 3, 2020, 3:18:55 PM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 0f88a225
- Parents:
- 6011658
- Location:
- libcfa/src/concurrency
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/io.cfa
r6011658 rfe9468e2 160 160 static inline void process(struct io_uring_cqe & cqe ) { 161 161 struct io_future_t * future = (struct io_future_t *)(uintptr_t)cqe.user_data; 162 __cfadbg_print_safe( io, "Kernel I/O : Syscall completed : cqe %p, result %d for %p\n", future, cqe.res, data->thrd);162 __cfadbg_print_safe( io, "Kernel I/O : Syscall completed : cqe %p, result %d for %p\n", &cqe, cqe.res, future ); 163 163 164 164 fulfil( *future, cqe.res ); … … 298 298 __u32 mask = *ring.submit_q.mask; 299 299 300 disable_interrupts(); 301 __u32 off = __tls_rand(); 302 enable_interrupts( __cfaabi_dbg_ctx ); 300 __u32 off = thread_rand(); 303 301 304 302 // Loop around looking for an available spot … … 344 342 __u32 ready_mask = ring.submit_q.ready_cnt - 1; 345 343 346 disable_interrupts(); 347 __u32 off = __tls_rand(); 348 enable_interrupts( __cfaabi_dbg_ctx ); 344 __u32 off = thread_rand(); 349 345 350 346 __u32 picked; -
libcfa/src/concurrency/io/call.cfa.in
r6011658 rfe9468e2 84 84 85 85 /* paranoid */ verifyf( cltr->io.ctxs, "default io contexts for cluster %p are missing\\n", cltr); 86 return &cltr->io.ctxs[ __tls_rand() % cltr->io.cnt ];86 return &cltr->io.ctxs[ thread_rand() % cltr->io.cnt ]; 87 87 } 88 88 #endif -
libcfa/src/concurrency/kernel/fwd.hfa
r6011658 rfe9468e2 132 132 } 133 133 134 extern uint64_t thread_rand(); 135 134 136 //----------------------------------------------------------------------- 135 137 // Statics call at the end of each thread to register statistics -
libcfa/src/concurrency/thread.cfa
r6011658 rfe9468e2 162 162 } 163 163 164 uint64_t thread_rand() { 165 disable_interrupts(); 166 uint64_t ret = __tls_rand(); 167 enable_interrupts( __cfaabi_dbg_ctx ); 168 return ret; 169 } 170 164 171 // Local Variables: // 165 172 // mode: c //
Note: See TracChangeset
for help on using the changeset viewer.