Home | History | Annotate | Line # | Download | only in include
      1  1.2  reinoud /* $NetBSD: ucontext.h,v 1.2 2018/08/05 18:42:48 reinoud Exp $ */
      2  1.1  reinoud 
      3  1.1  reinoud #ifndef _USERMODE_UCONTEXT_H
      4  1.1  reinoud #define _USERMODE_UCONTEXT_H
      5  1.1  reinoud 
      6  1.1  reinoud #include <sys/ucontext.h>
      7  1.1  reinoud #include <machine/trap.h>
      8  1.1  reinoud #include <machine/psl.h>
      9  1.1  reinoud 
     10  1.1  reinoud #if defined(__i386__)
     11  1.1  reinoud 
     12  1.2  reinoud #define _UC_MACHINE_EFLAGS(uc) ((uc)->uc_mcontext.__gregs[_REG_EFL])
     13  1.2  reinoud 
     14  1.1  reinoud #elif defined(__x86_64__)
     15  1.1  reinoud 
     16  1.1  reinoud #define _UC_MACHINE_RFLAGS(uc) ((uc)->uc_mcontext.__gregs[26])
     17  1.1  reinoud 
     18  1.1  reinoud #elif defined(__arm__)
     19  1.1  reinoud #error port me
     20  1.1  reinoud #else
     21  1.1  reinoud #error port me
     22  1.1  reinoud #endif
     23  1.1  reinoud 
     24  1.1  reinoud #endif /* _USERMODE_UCONTEXT_H */
     25  1.1  reinoud 
     26