From owner-svn-src-all@freebsd.org Mon Jun 29 10:35:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 031C298F0B0; Mon, 29 Jun 2015 10:35:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E79321807; Mon, 29 Jun 2015 10:35:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5TAZ1TL044162; Mon, 29 Jun 2015 10:35:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5TAZ18I044157; Mon, 29 Jun 2015 10:35:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201506291035.t5TAZ18I044157@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 29 Jun 2015 10:35:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284925 - in head/sys/i386: i386 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2015 10:35:02 -0000 Author: kib Date: Mon Jun 29 10:35:00 2015 New Revision: 284925 URL: https://svnweb.freebsd.org/changeset/base/284925 Log: 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 Modified: head/sys/i386/i386/machdep.c head/sys/i386/include/frame.h Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Mon Jun 29 10:33:04 2015 (r284924) +++ head/sys/i386/i386/machdep.c Mon Jun 29 10:35:00 2015 (r284925) @@ -166,9 +166,6 @@ CTASSERT(offsetof(struct pcpu, pc_curthr 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 Modified: head/sys/i386/include/frame.h ============================================================================== --- head/sys/i386/include/frame.h Mon Jun 29 10:33:04 2015 (r284924) +++ head/sys/i386/include/frame.h Mon Jun 29 10:35:00 2015 (r284925) @@ -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