Changeset c7a900a for libcfa/src/concurrency/preemption.cfa
- Timestamp:
- Feb 21, 2020, 5:31:19 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- a8078ee
- Parents:
- a505021
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/preemption.cfa
ra505021 rc7a900a 184 184 185 185 // Enable interrupts by decrementing the counter 186 // If counter reaches 0, execute any pending CtxSwitch186 // If counter reaches 0, execute any pending __cfactx_switch 187 187 void enable_interrupts( __cfaabi_dbg_ctx_param ) { 188 188 processor * proc = kernelTLS.this_processor; // Cache the processor now since interrupts can start happening after the atomic store … … 218 218 219 219 // Disable interrupts by incrementint the counter 220 // Don't execute any pending CtxSwitch even if counter reaches 0220 // Don't execute any pending __cfactx_switch even if counter reaches 0 221 221 void enable_interrupts_noPoll() { 222 222 unsigned short prev = kernelTLS.preemption_state.disable_count; … … 272 272 273 273 // KERNEL ONLY 274 // Check if a CtxSwitch signal handler shoud defer274 // Check if a __cfactx_switch signal handler shoud defer 275 275 // If true : preemption is safe 276 276 // If false : preemption is unsafe and marked as pending … … 302 302 303 303 // Setup proper signal handlers 304 __cfaabi_sigaction( SIGUSR1, sigHandler_ctxSwitch, SA_SIGINFO | SA_RESTART ); // CtxSwitch handler304 __cfaabi_sigaction( SIGUSR1, sigHandler_ctxSwitch, SA_SIGINFO | SA_RESTART ); // __cfactx_switch handler 305 305 306 306 signal_block( SIGALRM ); … … 393 393 // Preemption can occur here 394 394 395 force_yield( __ALARM_PREEMPTION ); // Do the actual CtxSwitch395 force_yield( __ALARM_PREEMPTION ); // Do the actual __cfactx_switch 396 396 } 397 397
Note: See TracChangeset
for help on using the changeset viewer.