From patchwork Thu Jul 31 18:39:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland McGrath X-Patchwork-Id: 375381 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1C442140108 for ; Fri, 1 Aug 2014 04:39:59 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:from:to:subject:message-id:date; q= dns; s=default; b=logkrRYZSFwIHMEWXk8PRZCrF0ATMv3+beE/Jm+b2aiMCI nhvPYo7uaGAj2C2cr1590WWj5qoo3HW0oDGTU/fTYJtka+7Y3J4di6BnfbTHxRIT adSZT7ftMs7KcXLjJm1xe3C5Ar1GuhzWq2LH9BZduVLYuoNpkIJ1C/0IBkbQM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:from:to:subject:message-id:date; s= default; bh=EBztUlALMl3JBATT5AGqle9QHIM=; b=M6TITw/Jf+kXKsJuB9i5 dJtVSEgcGTMNE4Bu/febJel/eL4kB/xWbJZLu94YFGcSoGrAujnueMmFUPwqHZop WDNoDzawgb+Hb4o24DhdGyiRgG+RI9XVNEBUhmd8f9tycvLbalUwgBaKnW4TtzKT HWj/C59DbLVZtB8agw755ZU= Received: (qmail 1570 invoked by alias); 31 Jul 2014 18:39:53 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 1547 invoked by uid 89); 31 Jul 2014 18:39:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: topped-with-meat.com MIME-Version: 1.0 From: Roland McGrath To: "GNU C. Library" Subject: [COMMITTED PATCH] Split nptl-signals.h out from pthreadP.h Message-Id: <20140731183949.45DF82C3A0D@topped-with-meat.com> Date: Thu, 31 Jul 2014 11:39:49 -0700 (PDT) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=SvUDtp+0 c=1 sm=1 tr=0 a=WkljmVdYkabdwxfqvArNOQ==:117 a=14OXPxybAAAA:8 a=i3oyBRUNvqQA:10 a=4RE-qcvYBkEA:10 a=Z6MIti7PxpgA:10 a=kj9zAlcOel0A:10 a=hOe2yjtxAAAA:8 a=mDV3o1hIAAAA:8 a=lQ6D_QjvRqXEDrbvXJcA:9 a=CjuIK1q_8ugA:10 Verified no compiled code changes on x86_64-linux-gnu. 2014-07-31 Roland McGrath * nptl/pthreadP.h (SIGCANCEL, SIGTIMER, SIGSETXID, __xidcmd): Moved ... * sysdeps/unix/sysv/linux/nptl-signals.h: ... to this new file. * sysdeps/nptl/nptl-signals.h: New file. * nptl/pthreadP.h: Include . --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -32,6 +32,8 @@ #include #include #include +#include + /* Atomic operations on TLS memory. */ #ifndef THREAD_ATOMIC_CMPXCHG_VAL @@ -314,22 +316,6 @@ __do_cancel (void) # define LIBC_CANCEL_HANDLED() /* Nothing. */ #endif -/* The signal used for asynchronous cancelation. */ -#define SIGCANCEL __SIGRTMIN - - -/* Signal needed for the kernel-supported POSIX timer implementation. - We can reuse the cancellation signal since we can distinguish - cancellation from timer expirations. */ -#define SIGTIMER SIGCANCEL - - -/* Signal used to implement the setuid et.al. functions. */ -#define SIGSETXID (__SIGRTMIN + 1) - -/* Used to communicate with signal handler. */ -extern struct xid_command *__xidcmd attribute_hidden; - /* Internal prototypes. */ --- /dev/null +++ b/sysdeps/nptl/nptl-signals.h @@ -0,0 +1,22 @@ +/* Special use of signals in NPTL internals. Stub version. + Copyright (C) 2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* This file can define the macros SIGCANCEL, SIGTIMER, and SIGSETXID to + signal numbers reserved by libpthread for those internal purposes. + + Note that some code presumes SIGTIMER is the same as SIGCANCEL. */ --- /dev/null +++ b/sysdeps/unix/sysv/linux/nptl-signals.h @@ -0,0 +1,33 @@ +/* Special use of signals in NPTL internals. Linux version. + Copyright (C) 2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* The signal used for asynchronous cancelation. */ +#define SIGCANCEL __SIGRTMIN + + +/* Signal needed for the kernel-supported POSIX timer implementation. + We can reuse the cancellation signal since we can distinguish + cancellation from timer expirations. */ +#define SIGTIMER SIGCANCEL + + +/* Signal used to implement the setuid et.al. functions. */ +#define SIGSETXID (__SIGRTMIN + 1) + +/* Used to communicate with signal handler. */ +extern struct xid_command *__xidcmd attribute_hidden;