Changeset b2b44d8


Ignore:
Timestamp:
Feb 1, 2018, 9:25:57 AM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
05f4b85
Parents:
4ab3d68e
Message:

some arm cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/preemption.c

    r4ab3d68e rb2b44d8  
    4949// Machine specific register name
    5050#if   defined(__x86_64__)
    51 #define CFA_REG_IP REG_RIP
     51#define CFA_REG_IP gregs[REG_RIP]
    5252#elif defined(__i386__)
    53 #define CFA_REG_IP REG_EIP
     53#define CFA_REG_IP gregs[REG_EIP]
    5454#elif defined(__ARM_ARCH__)
    55 #define CFA_REG_IP REG_R15
     55#define CFA_REG_IP arm_pc
    5656#endif
    5757
     
    284284// Receives SIGUSR1 signal and causes the current thread to yield
    285285void 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
    293289        if( !preemption_ready() ) { return; }
    294290
Note: See TracChangeset for help on using the changeset viewer.