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