Changeset 57f70ab
- Timestamp:
- May 13, 2021, 3:47:26 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 8cd5434
- Parents:
- a9172b5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.cfa
ra9172b5 r57f70ab 182 182 MAIN_LOOP: 183 183 for() { 184 #if 1 184 #define OLD_MAIN 1 185 #if OLD_MAIN 185 186 // Check if there is pending io 186 187 __maybe_io_drain( this ); … … 262 263 263 264 #else 264 265 #warning new kernel loop 265 266 SEARCH: { 266 267 /* paranoid */ verify( ! __preemption_enabled() ); … … 277 278 278 279 // Spin a little on I/O, just in case 279 for(25) {280 for(5) { 280 281 __maybe_io_drain( this ); 281 282 readyThread = pop_fast( this->cltr ); … … 284 285 285 286 // no luck, try stealing a few times 286 for(25) {287 for(5) { 287 288 if( __maybe_io_drain( this ) ) { 288 289 readyThread = pop_fast( this->cltr ); … … 867 868 unsigned tail = *ctx->cq.tail; 868 869 if(head == tail) return false; 870 #if OLD_MAIN 869 871 ready_schedule_lock(); 870 872 ret = __cfa_io_drain( proc ); 871 873 ready_schedule_unlock(); 874 #else 875 ret = __cfa_io_drain( proc ); 876 #endif 872 877 #endif 873 878 return ret;
Note: See TracChangeset
for help on using the changeset viewer.