Changeset d529ad0
- Timestamp:
- Mar 3, 2022, 3:17:05 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
- Children:
- fc01219
- Parents:
- 9cd44ba
- Location:
- libcfa/src/concurrency
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/io.cfa
r9cd44ba rd529ad0 175 175 /* paranoid */ verify( ! __preemption_enabled() ); 176 176 177 ctx.proc->io.pending = false;177 __atomic_store_n(&ctx.proc->io.pending, false, __ATOMIC_RELAXED); 178 178 } 179 179 … … 304 304 sq.to_submit += have; 305 305 306 ctx->proc->io.pending = true;307 ctx->proc->io.dirty = true;306 __atomic_store_n(&ctx->proc->io.pending, true, __ATOMIC_RELAXED); 307 __atomic_store_n(&ctx->proc->io.dirty , true, __ATOMIC_RELAXED); 308 308 } 309 309 … … 499 499 bool we = enqueue(ctx->ext_sq, (__outstanding_io&)ei); 500 500 501 ctx->proc->io.pending = true;501 __atomic_store_n(&ctx->proc->io.pending, true, __ATOMIC_SEQ_CST); 502 502 503 503 if( we ) { -
libcfa/src/concurrency/kernel.cfa
r9cd44ba rd529ad0 251 251 if( __atomic_load_n(&this->do_terminate, __ATOMIC_SEQ_CST) ) break MAIN_LOOP; 252 252 253 if( this->io.pending && !this->io.dirty) {253 if(__atomic_load_n(&this->io.pending, __ATOMIC_RELAXED) && !__atomic_load_n(&this->io.dirty, __ATOMIC_RELAXED)) { 254 254 __IO_STATS__(true, io.flush.dirty++; ) 255 255 __cfa_io_flush( this, 0 ); -
libcfa/src/concurrency/kernel.hfa
r9cd44ba rd529ad0 92 92 struct { 93 93 $io_context * ctx; 94 bool pending;95 bool dirty;94 volatile bool pending; 95 volatile bool dirty; 96 96 } io; 97 97
Note: See TracChangeset
for help on using the changeset viewer.