- File:
-
- 1 edited
-
src/libcfa/concurrency/preemption.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/preemption.c
r258e6ad5 r05615ba 10 10 // Created On : Mon Jun 5 14:20:42 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jan 23 17:59:30 201813 // Update Count : 712 // Last Modified On : Fri Jul 21 22:36:05 2017 13 // Update Count : 2 14 14 // 15 15 16 16 #include "preemption.h" 17 17 18 #define ftype `ftype`19 18 extern "C" { 20 19 #include <errno.h> … … 27 26 #include <unistd.h> 28 27 } 29 #undef ftype 28 30 29 31 30 #ifdef __USE_STREAM__ … … 61 60 62 61 // Machine specific register name 63 #if defined(__x86_64__)62 #ifdef __x86_64__ 64 63 #define CFA_REG_IP REG_RIP 65 #el if defined(__i386__)64 #else 66 65 #define CFA_REG_IP REG_EIP 67 #elif defined(__ARM_ARCH__)68 #define CFA_REG_IP REG_R1569 66 #endif 70 67 … … 299 296 // Receives SIGUSR1 signal and causes the current thread to yield 300 297 void sigHandler_ctxSwitch( __CFA_SIGPARMS__ ) { 301 #if defined( __ARM_ARCH )302 __cfaabi_dbg_debug_do( last_interrupt = (void *)(cxt->uc_mcontext.arm_pc); )303 #else304 298 __cfaabi_dbg_debug_do( last_interrupt = (void *)(cxt->uc_mcontext.gregs[CFA_REG_IP]); ) 305 #endif 306 307 // Check if it is safe to preempt here 299 300 // Check if it is safe to preempt here 308 301 if( !preemption_ready() ) { return; } 309 302
Note:
See TracChangeset
for help on using the changeset viewer.