From 67042ee4424a0596a3848a68d5576b81daf0b21c Mon Sep 17 00:00:00 2001 From: kib Date: Mon, 29 Jun 2015 10:35:00 +0000 Subject: [PATCH] Move CS_SECURE() and EFL_SECURE() macros to the machine/frame.h. They are useful for most implementations of sendsig(). Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/i386/i386/machdep.c | 3 --- sys/i386/include/frame.h | 8 ++++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 0373b6fdda90..f0a06a828513 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -166,9 +166,6 @@ CTASSERT(offsetof(struct pcpu, pc_curthread) == 0); extern register_t init386(int first); extern void dblfault_handler(void); -#define CS_SECURE(cs) (ISPL(cs) == SEL_UPL) -#define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) - #if !defined(CPU_DISABLE_SSE) && defined(I686_CPU) #define CPU_ENABLE_SSE #endif diff --git a/sys/i386/include/frame.h b/sys/i386/include/frame.h index 0953be70087f..150ea207f87e 100644 --- a/sys/i386/include/frame.h +++ b/sys/i386/include/frame.h @@ -4,3 +4,11 @@ /* $FreeBSD$ */ #include + +#ifndef __I386_FRAME_H__ +#define __i386_FRAME_H__ + +#define CS_SECURE(cs) (ISPL(cs) == SEL_UPL) +#define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) + +#endif