Changeset b7d6a36 for libcfa/src/concurrency/kernel.cfa
- Timestamp:
- Feb 20, 2020, 4:15:51 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:
- 6a490b2
- Parents:
- dca5802 (diff), 2cbfe92 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.cfa
rdca5802 rb7d6a36 10 10 // Created On : Tue Jan 17 12:27:26 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Dec 5 16:25:52 201913 // Update Count : 5 212 // Last Modified On : Tue Feb 4 13:03:15 2020 13 // Update Count : 58 14 14 // 15 15 … … 210 210 211 211 static void start(processor * this); 212 void ?{}(processor & this, const char * name, cluster & cltr) with( this ) {212 void ?{}(processor & this, const char name[], cluster & cltr) with( this ) { 213 213 this.name = name; 214 214 this.cltr = &cltr; … … 240 240 } 241 241 242 void ?{}(cluster & this, const char * name, Duration preemption_rate) with( this ) {242 void ?{}(cluster & this, const char name[], Duration preemption_rate) with( this ) { 243 243 this.name = name; 244 244 this.preemption_rate = preemption_rate; … … 454 454 } 455 455 456 static void Abort( int ret, const char * func) {456 static void Abort( int ret, const char func[] ) { 457 457 if ( ret ) { // pthread routines return errno values 458 458 abort( "%s : internal error, error(%d) %s.", func, ret, strerror( ret ) ); … … 503 503 verify( ! kernelTLS.preemption_state.enabled ); 504 504 505 kernelTLS.this_thread->curr_cor = dst; 505 506 __stack_prepare( &dst->stack, 65000 ); 506 CtxStart( &this->runner, CtxInvokeCoroutine);507 CtxStart(main, dst, this->runner, CtxInvokeCoroutine); 507 508 508 509 verify( ! kernelTLS.preemption_state.enabled ); … … 518 519 CtxSwitch( &src->context, &dst->context ); 519 520 // when CtxSwitch returns we are back in the src coroutine 521 522 mainThread->curr_cor = &mainThread->self_cor; 520 523 521 524 // set state of new coroutine to active … … 864 867 sigemptyset( &mask ); 865 868 sigaddset( &mask, SIGALRM ); // block SIGALRM signals 866 sigsuspend( &mask ); // block the processor to prevent further damage during abort 867 _exit( EXIT_FAILURE ); // if processor unblocks before it is killed, terminate it 869 sigaddset( &mask, SIGUSR1 ); // block SIGALRM signals 870 sigsuspend( &mask ); // block the processor to prevent further damage during abort 871 _exit( EXIT_FAILURE ); // if processor unblocks before it is killed, terminate it 868 872 } 869 873 else { … … 986 990 __cfaabi_dbg_debug_do( 987 991 extern "C" { 988 void __cfaabi_dbg_record(__spinlock_t & this, const char * prev_name) {992 void __cfaabi_dbg_record(__spinlock_t & this, const char prev_name[]) { 989 993 this.prev_name = prev_name; 990 994 this.prev_thrd = kernelTLS.this_thread;
Note: See TracChangeset
for help on using the changeset viewer.