- Timestamp:
- Feb 1, 2018, 9:25:57 AM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 05f4b85
- Parents:
- 4ab3d68e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/preemption.c
r4ab3d68e rb2b44d8 49 49 // Machine specific register name 50 50 #if defined(__x86_64__) 51 #define CFA_REG_IP REG_RIP51 #define CFA_REG_IP gregs[REG_RIP] 52 52 #elif defined(__i386__) 53 #define CFA_REG_IP REG_EIP53 #define CFA_REG_IP gregs[REG_EIP] 54 54 #elif defined(__ARM_ARCH__) 55 #define CFA_REG_IP REG_R1555 #define CFA_REG_IP arm_pc 56 56 #endif 57 57 … … 284 284 // Receives SIGUSR1 signal and causes the current thread to yield 285 285 void sigHandler_ctxSwitch( __CFA_SIGPARMS__ ) { 286 #if defined( __ARM_ARCH ) 287 __cfaabi_dbg_debug_do( last_interrupt = (void *)(cxt->uc_mcontext.arm_pc); ) 288 #else 289 __cfaabi_dbg_debug_do( last_interrupt = (void *)(cxt->uc_mcontext.gregs[CFA_REG_IP]); ) 290 #endif 291 292 // Check if it is safe to preempt here 286 __cfaabi_dbg_debug_do( last_interrupt = (void *)(cxt->uc_mcontext.CFA_REG_IP); ) 287 288 // Check if it is safe to preempt here 293 289 if( !preemption_ready() ) { return; } 294 290
Note: See TracChangeset
for help on using the changeset viewer.