Changeset 78a580d for libcfa/src/concurrency/io.cfa
- Timestamp:
- Mar 22, 2022, 3:28:29 PM (2 years ago)
- Branches:
- ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
- Children:
- ff7b2de
- Parents:
- 8f01ad71
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/io.cfa
r8f01ad71 r78a580d 42 42 #include "kernel/fwd.hfa" 43 43 #include "kernel/private.hfa" 44 #include "kernel/cluster.hfa" 44 45 #include "io/types.hfa" 45 46 … … 93 94 extern void __kernel_unpark( thread$ * thrd, unpark_hint ); 94 95 95 bool __cfa_io_drain( $io_context * ctx ) {96 bool __cfa_io_drain( $io_context * ctx, cluster * cltr ) { 96 97 /* paranoid */ verify( ! __preemption_enabled() ); 97 98 /* paranoid */ verify( ready_schedule_islocked() ); … … 112 113 } 113 114 115 unsigned long long ts_prev = ctx->cq.ts; 116 114 117 for(i; count) { 115 118 unsigned idx = (head + i) & mask; … … 125 128 126 129 __cfadbg_print_safe(io, "Kernel I/O : %u completed\n", count); 130 unsigned long long ts_next = ctx->cq.ts = rdtscl(); 127 131 128 132 // Mark to the kernel that the cqe has been seen … … 134 138 135 139 __atomic_unlock(&ctx->cq.lock); 140 141 touch_tsc( cltr->sched.io.tscs, ctx->cq.id, ts_prev, ts_next ); 136 142 137 143 return true; … … 143 149 /* paranoid */ verify( proc->io.ctx ); 144 150 145 __attribute__((unused))cluster * cltr = proc->cltr;151 cluster * cltr = proc->cltr; 146 152 $io_context & ctx = *proc->io.ctx; 147 153 … … 183 189 184 190 ready_schedule_lock(); 185 bool ret = __cfa_io_drain( &ctx );191 bool ret = __cfa_io_drain( &ctx, cltr ); 186 192 ready_schedule_unlock(); 187 193 return ret;
Note: See TracChangeset
for help on using the changeset viewer.