Changeset c59a346 for libcfa/src/concurrency/preemption.cfa
- Timestamp:
- Apr 29, 2020, 3:49:30 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:
- f6660520
- Parents:
- 44aad8f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/preemption.cfa
r44aad8f rc59a346 43 43 // FwdDeclarations : Signal handlers 44 44 static void sigHandler_ctxSwitch( __CFA_SIGPARMS__ ); 45 static void sigHandler_alarm ( __CFA_SIGPARMS__ ); 45 46 static void sigHandler_segv ( __CFA_SIGPARMS__ ); 46 47 static void sigHandler_ill ( __CFA_SIGPARMS__ ); … … 256 257 257 258 if ( pthread_sigmask( SIG_BLOCK, &mask, 0p ) == -1 ) { 258 259 abort( "internal error, pthread_sigmask" ); 259 260 } 260 261 } … … 303 304 // Setup proper signal handlers 304 305 __cfaabi_sigaction( SIGUSR1, sigHandler_ctxSwitch, SA_SIGINFO | SA_RESTART ); // __cfactx_switch handler 306 __cfaabi_sigaction( SIGALRM, sigHandler_alarm , SA_SIGINFO | SA_RESTART ); // debug handler 305 307 306 308 signal_block( SIGALRM ); … … 394 396 395 397 force_yield( __ALARM_PREEMPTION ); // Do the actual __cfactx_switch 398 } 399 400 static void sigHandler_alarm( __CFA_SIGPARMS__ ) { 401 abort("SIGALRM should never reach the signal handler"); 396 402 } 397 403
Note: See TracChangeset
for help on using the changeset viewer.