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