Changeset c33c2af
- Timestamp:
- Sep 29, 2021, 6:37:12 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- 45c9441
- Parents:
- 197df9b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.cfa
r197df9b rc33c2af 196 196 197 197 if( !readyThread ) { 198 ready_schedule_lock(); 198 199 __cfa_io_flush( this ); 200 ready_schedule_unlock(); 201 199 202 readyThread = __next_thread_slow( this->cltr ); 200 203 } … … 277 280 278 281 if(this->io.pending && !this->io.dirty) { 282 ready_schedule_lock(); 279 283 __cfa_io_flush( this ); 284 ready_schedule_unlock(); 280 285 } 281 286 … … 317 322 318 323 // Don't block if we are done 319 if( __atomic_load_n(&this->do_terminate, __ATOMIC_SEQ_CST) ) break MAIN_LOOP; 324 if( __atomic_load_n(&this->do_terminate, __ATOMIC_SEQ_CST) ) { 325 ready_schedule_unlock(); 326 break MAIN_LOOP; 327 } 320 328 321 329 __STATS( __tls_stats()->ready.sleep.halts++; ) … … 939 947 /* paranoid */ verifyf( it, "Unexpected null iterator, at index %u of %u\n", i, count); 940 948 /* paranoid */ verify( it->local_data->this_stats ); 949 // __print_stats( it->local_data->this_stats, cltr->print_stats, "Processor", it->name, (void*)it ); 941 950 __tally_stats( cltr->stats, it->local_data->this_stats ); 942 951 it = &(*it)`next; … … 948 957 // this doesn't solve all problems but does solve many 949 958 // so it's probably good enough 959 disable_interrupts(); 950 960 uint_fast32_t last_size = ready_mutate_lock(); 951 961 … … 955 965 // Unlock the RWlock 956 966 ready_mutate_unlock( last_size ); 967 enable_interrupts(); 957 968 } 958 969
Note: See TracChangeset
for help on using the changeset viewer.