From patchwork Wed Aug 23 14:08:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 110842 Delivered-To: patch@linaro.org Received: by 10.37.128.210 with SMTP id c18csp6987907ybm; Wed, 23 Aug 2017 07:08:56 -0700 (PDT) X-Received: by 10.99.141.74 with SMTP id z71mr2841348pgd.40.1503497336252; Wed, 23 Aug 2017 07:08:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503497336; cv=none; d=google.com; s=arc-20160816; b=MVq+mGELNK2eGNgypNkcpFt52LaROj+VlJ+5PsK+EUjuiXcFYiMfvJKaOXyL/pmPAS ikdwn79rjlc4O9o3JvbQiNMlXOdeTJjaFm9Osdgjwv5Aag5mJu9c2GSgkezhwPG+AZZA TNrYR3OgsG0kDMGgK3sXaeB5tGTxMpxs+EqpCPRPFE2IhYPtXVrE+lewjQfEWbxT6iW9 zIcg9pjSCUqLajz2DawaKate7kPegQSICX6SapslKY/hqN1QYO0sNupFSEAIvJ+gQ52h fMlcX3bzlwvfyccWofgcsNBasLG6eR8hI0eRVrfEkgjJ036tsasK4cSu597oHjT+g/cR 9wGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:to:from:delivered-to:sender:list-help :list-post:list-archive:list-subscribe:list-unsubscribe:list-id :precedence:mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=EGhebvrzazxPlFMMVpo0Bpnfom3BvWRhutWj7dDmHWk=; b=xSjRBiEAeE931ePrGu8w+nN6baXfxyg0vHtWiAWXkNP1ujoNgjwnvuUnIunPnrihXX dvh5uRGqROOPi2/dlvY6b4c/MMafMsc1Y649MdE+69Ka8LrKv2xdV0vY9IwQ+osVW1vZ ylFDNtIpZvSHQ1nGYqom0oP+jYA7K7VnQBYU2BldJfjcP29hIkmaoGd9pCw8QS1gah9H eMv6HKeTbDVLtBSFe8lihJ/m3T9davFUBPlCWGPLW6ZVFDiOlCgZTKsyAnOkkK6MrUqM I64vMVXx8uKW1LxjC9OGLqWUBMv9soYzV/pZb4gcyMWL80MB0ykLfxkwmqcVv/ueyysK yvwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=S3kG4DuV; spf=pass (google.com: domain of libc-alpha-return-83700-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-83700-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id h10si1206107plk.237.2017.08.23.07.08.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Aug 2017 07:08:56 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-83700-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=S3kG4DuV; spf=pass (google.com: domain of libc-alpha-return-83700-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-83700-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; q=dns; s= default; b=ChOhhaz9O0LPhknzJtNYRpmYUoqlfCn9cpAEJKGGcSUJ+PUjowv+S FR5TcqP2Zauffs0zWQSHg8a5f8C2PpfZpB1iU0/OYzaD1Y0zmcw9cNppHkpAGKhk HKQCjPdE0MRPIoz+jUl5wTHsyAzu8ju7+mGpZZR9iag8tmJe/CVXgg= 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:from:to:subject:date:message-id; s=default; bh=lndl/ryF5FCnFE/3EF8MyBDsxcA=; b=S3kG4DuVi9bFEXJvSRKeE0LI6lAX quLIkc9smtr8MJRzu7H8Haskb+rTkeG4qEQ47kFkw/qrG/AglcTM+wJ5dVJNShXB VT+wbwL3vNi++PoMKTOTJhrtPTDW8t14gDqnfOjGFdI47Aq2GaysDnTR6CeNTzAN UQ4Nx60cXP09xLo= Received: (qmail 53511 invoked by alias); 23 Aug 2017 14:08:43 -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 51932 invoked by uid 89); 23 Aug 2017 14:08:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-qt0-f169.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=EGhebvrzazxPlFMMVpo0Bpnfom3BvWRhutWj7dDmHWk=; b=qZNLzhfsAufpM+EcjSa0cSLKFBWRT9k9Xb5R4AXkOKzdw2dRWhLTr019vMqxh86sFK KbGfRIjDJmOVBxl6fyLBNpqFBLHdJV/vzaGw4GneMri7rc27FVjVQsdIBAbnjRNrtaeS S+x7ERoLsjyJKrVua6LToMhXG+tta6J9N0zFeXrYO2MyX06fH4iDiMlujx064kpUmrco 8+MfiYK9xsI9GlRM4gR4Rt/Fa60H6iVS8JCq0/NhJZa4TeI+3xDGCAfE+i1PCSjR7GcC EVxBrkzuPaf63ryKI86CNBRw5QvzkTMQQfqvGDg4fgNCcrAYC4F1WdPy2R7y7uyLd7cy PLcg== X-Gm-Message-State: AHYfb5hUKTmSYDagl/LKqbESFhDwx3jVxORED8sKKFatEzJmABHb0F/e GQtJJ4XPF5MWlSsQqoFqlg== X-Received: by 10.200.3.73 with SMTP id w9mr3672757qtg.108.1503497318495; Wed, 23 Aug 2017 07:08:38 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [COMMITTED] Consolidate remaning non cancellable definitions Date: Wed, 23 Aug 2017 11:08:33 -0300 Message-Id: <1503497313-23420-1-git-send-email-adhemerval.zanella@linaro.org> This patch consolidate the remaning non cancellable syscall definitions on not-cancel.h header. They are: * __fcntl_nocancel: Moved from fcntl.h to not-cancel.h. * __sigsuspend_nocancel: Removed since 988f991b50 it is not used or defined anymore. * __nanosleep_nocancel: Removed since 6f33fd046b it is defined on not-cancel.h. Now all non-cancellable syscall definition are defined on not-cancel (the only exceptions is the stdio symbol __fxprintf_nocancel which uses non cancellable open and it is used on getopt implementation). Checked on x86_64-linux-gnu and with build-many-glibc.py. * include/fcntl.h (__fcntl_nocancel): Remove definition. * include/signal.h (__sigsuspend_nocancel): Likewise. * include/time.h (__nanosleep_nocancel): Likewise. * sysdeps/generic/not-cancel.h (__fcntl_nocancel): New macro. * login/utmp_file.c: Include non cancellable syscall header. * sysdeps/unix/sysv/linux/not-cancel.h (__fcntl_nocancel): New prototype. --- ChangeLog | 10 ++++++++++ include/fcntl.h | 3 --- include/signal.h | 3 --- include/time.h | 3 --- login/utmp_file.c | 1 + sysdeps/generic/not-cancel.h | 2 ++ sysdeps/unix/sysv/linux/not-cancel.h | 3 +++ 7 files changed, 16 insertions(+), 9 deletions(-) -- 2.7.4 diff --git a/include/fcntl.h b/include/fcntl.h index 9a007c3..3d68c5e 100644 --- a/include/fcntl.h +++ b/include/fcntl.h @@ -9,10 +9,7 @@ extern int __libc_open64 (const char *file, int oflag, ...); extern int __libc_open (const char *file, int oflag, ...); libc_hidden_proto (__libc_open) extern int __libc_fcntl (int fd, int cmd, ...) attribute_hidden; -#ifndef NO_CANCELLATION -extern int __fcntl_nocancel (int fd, int cmd, ...) attribute_hidden; libc_hidden_proto (__libc_fcntl) -#endif extern int __open (const char *__file, int __oflag, ...); libc_hidden_proto (__open) extern int __fcntl (int __fd, int __cmd, ...); diff --git a/include/signal.h b/include/signal.h index bcf1455..61ad422 100644 --- a/include/signal.h +++ b/include/signal.h @@ -26,9 +26,6 @@ extern int __sigprocmask (int __how, const sigset_t *__set, sigset_t *__oset); extern int __sigsuspend (const sigset_t *__set); libc_hidden_proto (__sigsuspend) -#ifndef NO_CANCELLATION -extern int __sigsuspend_nocancel (const sigset_t *__set) attribute_hidden; -#endif extern int __sigwait (const sigset_t *__set, int *__sig); libc_hidden_proto (__sigwait) extern int __sigwaitinfo (const sigset_t *__set, siginfo_t *__info); diff --git a/include/time.h b/include/time.h index 9956b82..7369608 100644 --- a/include/time.h +++ b/include/time.h @@ -79,9 +79,6 @@ extern struct tm *__tz_convert (const time_t *timer, int use_localtime, struct t extern int __nanosleep (const struct timespec *__requested_time, struct timespec *__remaining); hidden_proto (__nanosleep) -extern int __nanosleep_nocancel (const struct timespec *__requested_time, - struct timespec *__remaining) - attribute_hidden; extern int __getdate_r (const char *__string, struct tm *__resbufp); diff --git a/login/utmp_file.c b/login/utmp_file.c index d410b6c..e0d2710 100644 --- a/login/utmp_file.c +++ b/login/utmp_file.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "utmp-private.h" #include "utmp-equal.h" diff --git a/sysdeps/generic/not-cancel.h b/sysdeps/generic/not-cancel.h index 70ead55..e5a850c 100644 --- a/sysdeps/generic/not-cancel.h +++ b/sysdeps/generic/not-cancel.h @@ -42,5 +42,7 @@ __pause () #define __nanosleep_nocancel(requested_time, remaining) \ __nanosleep (requested_time, remaining) +#define __fcntl_nocancel(fd, cmd, ...) \ + __fcntl (fd, cmd, __VA_ARGS__) #define NO_CANCELLATION 1 diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h index f73b2bb..ae0b059 100644 --- a/sysdeps/unix/sysv/linux/not-cancel.h +++ b/sysdeps/unix/sysv/linux/not-cancel.h @@ -85,4 +85,7 @@ libc_hidden_proto (__pause_nocancel) __typeof (__nanosleep) __nanosleep_nocancel; hidden_proto (__nanosleep_nocancel) +/* Uncancelable fcntl. */ +__typeof (__fcntl) __fcntl_nocancel attribute_hidden; + #endif /* NOT_CANCEL_H */