Changeset 68f36f4 for libcfa/src/concurrency/kernel.cfa
- Timestamp:
- Jun 19, 2020, 4:59:19 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:
- 0f89d4f
- Parents:
- 64a7146
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.cfa
r64a7146 r68f36f4 371 371 372 372 // Make sure we aren't on the idle queue 373 #if !defined(__CFA_NO_STATISTICS__) 374 bool removed = 375 #endif 373 376 unsafe_remove( this->cltr->idles, this ); 374 Link(processor) * link = &this->cltr->idles.stack; 375 for() { 376 processor * next = link->top; 377 if( next == this ) { 378 link->top = getNext(this)->top; 379 break; 380 } 381 if( next == 0p ) break; 382 link = getNext(next); 383 } 377 378 #if !defined(__CFA_NO_STATISTICS__) 379 if(removed) __tls_stats()->ready.sleep.exits++; 380 #endif 384 381 385 382 // Unlock the RWlock … … 672 669 push( thrd->curr_cluster, thrd ); 673 670 674 __wake_one(id, thrd->curr_cluster); 671 #if !defined(__CFA_NO_STATISTICS__) 672 bool woke = 673 #endif 674 __wake_one(id, thrd->curr_cluster); 675 676 #if !defined(__CFA_NO_STATISTICS__) 677 if(woke) __tls_stats()->ready.sleep.wakes++; 678 #endif 675 679 ready_schedule_unlock( id ); 676 680 … … 969 973 if( do_terminate ) return; 970 974 975 #if !defined(__CFA_NO_STATISTICS__) 976 __tls_stats()->ready.sleep.halts++; 977 #endif 971 978 // Push self to queue 972 979 push(cltr->idles, *this); … … 979 986 __wake_one( id, cltr ); 980 987 ready_schedule_unlock( id ); 988 #if !defined(__CFA_NO_STATISTICS__) 989 __tls_stats()->ready.sleep.cancels++; 990 #endif 981 991 } 982 992
Note: See TracChangeset
for help on using the changeset viewer.