Changeset 6502a2b
- Timestamp:
- May 4, 2020, 12:54:56 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 3c039b0
- Parents:
- c5c743e
- Location:
- libcfa/src/concurrency
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/io.cfa
rc5c743e r6502a2b 89 89 void ?{}( __io_poller_fast & this, struct cluster & cltr ) { 90 90 this.ring = &cltr.io; 91 this.waiting = true; 91 92 (this.thrd){ "Fast I/O Poller", cltr }; 92 93 } … … 242 243 243 244 #if defined(__CFA_IO_POLLING_USER__) 245 verify( this.io.poller.fast.waiting ); 246 verify( this.io.poller.fast.thrd.state == Blocked ); 247 248 this.io.poller.fast.thrd.curr_cluster = mainCluster; 249 244 250 // unpark the fast io_poller 245 251 unpark( &this.io.poller.fast.thrd __cfaabi_dbg_ctx2 ); … … 409 415 while(!__atomic_load_n(&this.ring->done, __ATOMIC_SEQ_CST)) { 410 416 // Drain the io 411 if(0 > __drain_io( *this.ring, 0p, 0, false )) { 417 this.waiting = false; 418 int ret = __drain_io( *this.ring, 0p, 0, false ); 419 this.waiting = true; 420 if(0 > ret) { 412 421 // If we got something, just yield and check again 413 422 yield(); -
libcfa/src/concurrency/kernel.hfa
rc5c743e r6502a2b 191 191 struct __io_poller_fast { 192 192 struct io_ring * ring; 193 bool waiting; 193 194 $thread thrd; 194 195 }; -
libcfa/src/concurrency/kernel_private.hfa
rc5c743e r6502a2b 59 59 extern volatile thread_local __cfa_kernel_preemption_state_t preemption_state __attribute__ ((tls_model ( "initial-exec" ))); 60 60 61 extern cluster * mainCluster; 62 61 63 //----------------------------------------------------------------------------- 62 64 // Threads
Note: See TracChangeset
for help on using the changeset viewer.