From patchwork Fri May 12 17:58:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 99712 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp430882qge; Fri, 12 May 2017 10:58:40 -0700 (PDT) X-Received: by 10.84.131.129 with SMTP id d1mr7521565pld.16.1494611920009; Fri, 12 May 2017 10:58:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494611920; cv=none; d=google.com; s=arc-20160816; b=0CBA9KyXq/dRF/0TE2KH2zBo2phlgJsQlC1fN1whD2va2VRjKFE87Q222oJJAJMKFC 7dmbRR+SUF/dvZaw7+YtMqnW8aJLO/+aDZWdD6OhhTh/iWhlcOmbwWt2yAnuSprPu6Ji l/roeuwGbkUGEplyneJZryCf0KbiS6jPZaRxVWnnD+ZnUBEc+NGpbHWTVtc1hMO79Cq9 /7IHa5nFC4FIBeOs337dRZf6ksnkz9+/s3J77mdV5yPo4RsDmCUKlLxsqEk+KrJVCV5Y O6B7+yoJJbNbXOGxX/lRCrRD8zynAFWGc6Mp7UPzXWWfhCF0+cPHfPINXB1upDv2ye5Q LzQQ== 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=aQfMVMX8oLNHSzWWgc3Pn/SpPA3cph7IVFFUq5TwGfM=; b=ome3uM0RXJcuovLhOZTzwFOj3MHENvdHlfxFnelTLCvD9CqBRyX+4L5K5vmZMIshze vUOR7or2miktc+Vbh9FywRMW26t5HEABzKwjKYgOUo2xsX7m5NTISCXP+0M6Q4H3cLYN otbBv7wllBaCdS41Vm6Sgpxx6T+2j03aLq1wwowUOIGo/Zn8cmA1HZyzVTYJz4TE8HYO q1nxRHn05B5mAnsLCD/b6fcvQ2GKF47NieVqqbJUpIdyvzno66R33crhjcKPsGR8r0qK CPM1/I+uEfJO50wx1cHceys0DnKhiM0+W2TLJu4mTkJbjr2CLe2pgMZagQvcfWiWM8su UOhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-79375-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79375-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 y12si3934354pge.207.2017.05.12.10.58.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2017 10:58:39 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-79375-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; spf=pass (google.com: domain of libc-alpha-return-79375-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79375-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=o8pOH7K4Kd39JYIyco0DgVbOSdMkkn0WimKmL+rkikYnafdzgHzz3 USlWvfVZtYPyiJ7p0O3digAUjhuwIuiTP03fslgMzxz/4+Fr6ZxP3ddVdm3he0ne QV4PGPp4a0gJrVuT3XOVgFqJcUpkqSmD0mMFGjI9M5d9tX8b+ZgzWU= 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=/s1GlJbO2KjL1HdJv1bmmsoy7V0=; b=xU3l71X+3z5TRGWmrZWcpjf+L2fv 9uBecmXDPIiWTLVXrGduETuTpY74YcOJ++Q8Ew/7TK8skMK9+6QlQuNQ6u9ZmXqE /myC0NTQfK8vyFD9S3cN27eKUyMkYdPVC/Zix0NvDLZad+IXvXcEH81mYrmC5k0C XzsDoBn/DDJLxek= Received: (qmail 38500 invoked by alias); 12 May 2017 17:58:26 -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 32275 invoked by uid 89); 12 May 2017 17:58:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL, 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=interrupted, EXTRA, Hx-languages-length:4216 X-HELO: mail-qk0-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=aQfMVMX8oLNHSzWWgc3Pn/SpPA3cph7IVFFUq5TwGfM=; b=rd1fV7GZutXLNnRzYwWuH6hZj4LDcZfjH1Y/VHk5c4a80js6anhxrl5U+qTDT878J4 l0Yu3dqZHecIRiTmkI1+nwkstcZ9fWwlRQhwJca8UNBykAHRIggW4FKO8LuY/BD1KJPk +POSqQ9BRZhiKlIWm9uM0546r4VfcPNQD9CPyo3mvsCdklg1pIKOP6x0dtMfaTexCcIY 1ViSJZ8S3Y9OEsfQ9vogtqmR2pVH+IXOPPTZ4L+24v7XzoeUyXwbRqQgVQWKmqrlyl7q /B36rgcR/KNDQ33h8G+pvesPz1uVfZPnInjXIxhZcb8PSwrCvF8svsmDQavsNevoGJHE Fyng== X-Gm-Message-State: AODbwcDt/97pJXBu/4dvP4kmyz1mZv3QMhM9KoaXSZOAjnvzQZXQ0QZj qOhZsneO4tT0apGBRhBcwQ== X-Received: by 10.55.114.2 with SMTP id n2mr5466616qkc.157.1494611901077; Fri, 12 May 2017 10:58:21 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 01/13] posix: Consolidate Linux pause syscall Date: Fri, 12 May 2017 14:58:02 -0300 Message-Id: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> This patch consolidates the pause Linux implementation on sysdeps/unix/sysv/linux/pause.c. If defined the pause syscall (__NR_pause) will be used, other ppoll with 0 arguments will be used instead. It has the small advantage of generic pause implementation with uses rt_sigprocmask plus rt_sigsuspend because it requires only one syscall and the pause is done atomically regarding signal handling (for instance, pause may not be interrupted if the signal arrives between the rt_sigprocmask and rt_sigsuspend syscall). Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu, sparc64-linux-gnu, and sparcv9-linux-gnu. * sysdeps/unix/sysv/linux/generic/pause.c: Remove file. * sysdeps/unix/sysv/linux/sparc/sparc64/pause.c: Likewise. * sysdeps/unix/sysv/linux/sparc/kernel-features.h [__arch64__] (__NR_pause): Undefine. * sysdeps/unix/sysv/linux/pause.c: New file. * sysdeps/unix/sysv/linux/syscalls.list: Remove pause from auto-generation list. --- ChangeLog | 10 ++++++++++ sysdeps/unix/sysv/linux/{generic => }/pause.c | 18 +++++++----------- sysdeps/unix/sysv/linux/sparc/kernel-features.h | 6 ++++++ sysdeps/unix/sysv/linux/sparc/sparc64/pause.c | 9 --------- sysdeps/unix/sysv/linux/syscalls.list | 1 - 5 files changed, 23 insertions(+), 21 deletions(-) rename sysdeps/unix/sysv/linux/{generic => }/pause.c (75%) delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc64/pause.c -- 2.7.4 diff --git a/sysdeps/unix/sysv/linux/generic/pause.c b/sysdeps/unix/sysv/linux/pause.c similarity index 75% rename from sysdeps/unix/sysv/linux/generic/pause.c rename to sysdeps/unix/sysv/linux/pause.c index a8b3e33..c6b252a 100644 --- a/sysdeps/unix/sysv/linux/generic/pause.c +++ b/sysdeps/unix/sysv/linux/pause.c @@ -1,6 +1,6 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. +/* Linux pause syscall implementation. + Copyright (C) 2017 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Chris Metcalf , 2011. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -26,14 +26,10 @@ int __libc_pause (void) { - sigset_t set; - - int rc = - SYSCALL_CANCEL (rt_sigprocmask, SIG_BLOCK, NULL, &set, _NSIG / 8); - if (rc == 0) - rc = SYSCALL_CANCEL (rt_sigsuspend, &set, _NSIG / 8); - - return rc; +#ifdef __NR_pause + return SYSCALL_CANCEL (pause); +#else + return SYSCALL_CANCEL (ppoll, 0, 0, 0, 0, 0); +#endif } - weak_alias (__libc_pause, pause) diff --git a/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/sysdeps/unix/sysv/linux/sparc/kernel-features.h index 72065a0..dd9108b 100644 --- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h +++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h @@ -32,6 +32,12 @@ # undef __ASSUME_ACCEPT_SYSCALL # undef __ASSUME_CONNECT_SYSCALL # undef __ASSUME_RECVFROM_SYSCALL +#else +/* sparc64 defines __NR_pause, however it is not supported (ENOSYS). + Undefine so pause.c can use a correct alternative. */ +# ifdef __NR_pause +# undef __NR_pause +# endif #endif /* sparc only supports ipc syscall. */ diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c b/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c deleted file mode 100644 index e399e7c..0000000 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include -#include -#include - -#define __sigprocmask(how, set, oset) \ - INLINE_SYSCALL (rt_sigprocmask, 4, how, set, oset, _NSIG / 8) - -#include diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index f4abf3e..eab30dd 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -44,7 +44,6 @@ munlock - munlock i:ai munlock munlockall - munlockall i: munlockall nanosleep - nanosleep Ci:pp __nanosleep nanosleep nfsservctl EXTRA nfsservctl i:ipp nfsservctl -pause - pause Ci: __libc_pause pause pipe - pipe i:f __pipe pipe pipe2 - pipe2 i:fi __pipe2 pipe2 pivot_root EXTRA pivot_root i:ss pivot_root From patchwork Fri May 12 17:58:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 99714 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp431018qge; Fri, 12 May 2017 10:59:02 -0700 (PDT) X-Received: by 10.84.135.129 with SMTP id 1mr7443892plj.57.1494611942674; Fri, 12 May 2017 10:59:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494611942; cv=none; d=google.com; s=arc-20160816; b=Vjqi3GEttcL7rcF+IgBU0lhsjI63PJZ9iMn/IodQM0eb7TCI2qq+SVBSjCr2JU/PwO pNPmTm7INdp61E7HLnK90M0UHUF77/VBPsThzeb5TO+ZXW9yxKPNNYRw9evw00a0Y4eu P5JF9ZcAdCG1RXLvD76baXxLbQjn8eBx3dCcBy8UpSshpcikUdcDsD/AOsQ2CsHlAPAe JD/49Wd+yR/6yesiUlHmPT0zeKRN0zBO7V9GL9Ryr5KSxWYEU1zd+/JeqGb9wLuHmO7t QY+9fEBG2lqKAJhq5UCOPPbOb+rzW7EA21q6078uovGSLNSsmHY+v/8kfu+SKISJd2y5 nmsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to: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=JavkqBfslo9VAooRLSXeQsPoW8TEvBaOkaUqiCWogc8=; b=Z0VJW0cBJZ0QsYVNL4DLyVE6FZ5pKI37ioCUE6ltF9tgO1dEIpInyzYbu9hmbioJLk /jieLfsjEvyT1FdHPW4nfwxTVQnUMC6hlUob5B6U8k+DwIXxU0GzJfzr2ABlnwAPgI14 D1juuXQo2yZelhJ6Ymyneihw2WNjXrlfdr/7+DxMqsvauGFs6Wm8pYVr/NUr4tJdkod0 SWKtdPZUvE7YyEev1Lqrg/j/NMdeRyf6Cyf+IgIFf1E62zp80E8VWu+IRi6J2Rs1zexN Y73RqRffCoGflNgk0uY4t6FgWWRQneGYQs4xZ+wjerJMSC8EDj0Uu8MLKgJjf2MDYhOM npmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-79377-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79377-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 m6si4084637pgn.387.2017.05.12.10.59.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2017 10:59:02 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-79377-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; spf=pass (google.com: domain of libc-alpha-return-79377-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79377-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:in-reply-to :references; q=dns; s=default; b=AwUn2/FFnJSJT3ksh+CZpOnne/9cWL5 EFtQeFHcp6CB1s1LsbMeLSdW6bEfl6LWfrx80i6cOGuoqUfWFJ3e2O/D1R34eo7+ He6Xhik657HQZkc+W18M8yOw7/LvdI9kFsnlaJPjleVfjTi3ko1NXCpKylRV925X LvDQFnY1FS5I= 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:in-reply-to :references; s=default; bh=baBbW7bNHuOcL8qdLSKGHEsGb7Q=; b=slt1B 73p/8IVIGiYMMmBZ2sj/SnAWiowk3oaTldaavv4kbdQ2/JMzIjI2ZL1Bcjdqu8Zn gB5DKJFDdFNmo6QS8uMzi9wMMUnYNuBSDBdvN9wTP2gl/kW9eSVOyxdSzk3tLF26 Apb7d0DrdVsb8ihFatQub24nHxV3k2FU+ypkvM= Received: (qmail 39201 invoked by alias); 12 May 2017 17:58:27 -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 33359 invoked by uid 89); 12 May 2017 17:58:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL, 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=Strong, sii, EXTRA, ipi X-HELO: mail-qk0-f177.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:in-reply-to :references; bh=JavkqBfslo9VAooRLSXeQsPoW8TEvBaOkaUqiCWogc8=; b=GSWLVJYj8hTqLgnqeNtPQ8BBfMEdSxXZXPl5mWlEjfRARDWJ6m2da1nKl8E6WFhTQN AfNALj+hS1JtLONzBD/GT62c8ktIwsQ8Kd6yEu8MeNlBdWANWl2DdwSYMcRg4LOHyRYD z2fDauCqj+2grKUO2TlZ6+WkMloENUzsMPthg//aHpGXn9l/xEvKV7T6IBZZd+g8RoHm cu7cs5sIT4j+UUaI24/uHwRZkEOsnkmRNoeCs65zY0TllHcQNyJCTCV3FPBUJat9/7bt 7737vdxAdPksKMuiFaiwcHSvpYHrmcl5uXZk46b/nd2cW/vKgbIGMdsDvAMomnFhC30w fcUQ== X-Gm-Message-State: AODbwcBEA6yU2CYrmffPcRd4G/CDnlUSNgc7Md/CsEsewJTNTUe5VWTp pBdg+wLe+SjQCANxzls+RQ== X-Received: by 10.55.157.198 with SMTP id g189mr4453657qke.111.1494611902420; Fri, 12 May 2017 10:58:22 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 02/13] posix: Consolidate Linux waitpid syscall Date: Fri, 12 May 2017 14:58:03 -0300 Message-Id: <1494611894-9282-2-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> References: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> This patch consolidates the waitpid Linux syscall generation on sysdeps/unix/sysv/linux/waitpid.c. It basically removes it from architecture auto-generation list and also remove arch specific implementations. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, arch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu. * sysdeps/unix/sysv/linux/sh/syscalls.list: Remove waitpid from auto-generated list. * sysdeps/unix/sysv/linux/m68k/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/i386/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/sparc/syscalls.list: Remove file. * sysdeps/unix/sysv/linux/tile/waitpid.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/syscalls.list: Likewise. --- ChangeLog | 8 ++++++++ sysdeps/unix/sysv/linux/i386/syscalls.list | 1 - sysdeps/unix/sysv/linux/m68k/syscalls.list | 1 - sysdeps/unix/sysv/linux/powerpc/syscalls.list | 3 --- sysdeps/unix/sysv/linux/sh/syscalls.list | 2 -- sysdeps/unix/sysv/linux/sparc/syscalls.list | 3 --- sysdeps/unix/sysv/linux/tile/waitpid.S | 18 ------------------ 7 files changed, 8 insertions(+), 28 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/powerpc/syscalls.list delete mode 100644 sysdeps/unix/sysv/linux/sparc/syscalls.list delete mode 100644 sysdeps/unix/sysv/linux/tile/waitpid.S -- 2.7.4 diff --git a/sysdeps/unix/sysv/linux/i386/syscalls.list b/sysdeps/unix/sysv/linux/i386/syscalls.list index 145393f..58020df 100644 --- a/sysdeps/unix/sysv/linux/i386/syscalls.list +++ b/sysdeps/unix/sysv/linux/i386/syscalls.list @@ -18,7 +18,6 @@ setfsuid - setfsuid32 Ei:i setfsuid modify_ldt EXTRA modify_ldt i:ipi __modify_ldt modify_ldt vm86old EXTRA vm86old i:p __vm86old vm86@GLIBC_2.0 vm86 - vm86 i:ip __vm86 vm86@@GLIBC_2.3.4 -waitpid - waitpid Ci:ipi __waitpid waitpid prlimit64 EXTRA prlimit64 i:iipp prlimit64 diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list index 4260f3e..55a377b 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscalls.list +++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list @@ -3,7 +3,6 @@ chown - chown32 i:sii __chown chown lchown - lchown32 i:sii __lchown lchown fchown - fchown32 i:iii __fchown fchown -waitpid - waitpid Ci:ipi __waitpid waitpid getegid - getegid32 Ei: __getegid getegid geteuid - geteuid32 Ei: __geteuid geteuid diff --git a/sysdeps/unix/sysv/linux/powerpc/syscalls.list b/sysdeps/unix/sysv/linux/powerpc/syscalls.list deleted file mode 100644 index 4f821e9..0000000 --- a/sysdeps/unix/sysv/linux/powerpc/syscalls.list +++ /dev/null @@ -1,3 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -waitpid - waitpid Ci:ipi __waitpid waitpid diff --git a/sysdeps/unix/sysv/linux/sh/syscalls.list b/sysdeps/unix/sysv/linux/sh/syscalls.list index 169d40f..32badd1 100644 --- a/sysdeps/unix/sysv/linux/sh/syscalls.list +++ b/sysdeps/unix/sysv/linux/sh/syscalls.list @@ -15,8 +15,6 @@ getgroups - getgroups32 i:ip __getgroups getgroups setfsgid - setfsgid32 Ei:i setfsgid setfsuid - setfsuid32 Ei:i setfsuid -waitpid - waitpid Ci:ipi __waitpid waitpid - prlimit64 EXTRA prlimit64 i:iipp prlimit64 fanotify_mark EXTRA fanotify_mark i:iiiiis __fanotify_mark fanotify_mark@@GLIBC_2.16 diff --git a/sysdeps/unix/sysv/linux/sparc/syscalls.list b/sysdeps/unix/sysv/linux/sparc/syscalls.list deleted file mode 100644 index 4f821e9..0000000 --- a/sysdeps/unix/sysv/linux/sparc/syscalls.list +++ /dev/null @@ -1,3 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -waitpid - waitpid Ci:ipi __waitpid waitpid diff --git a/sysdeps/unix/sysv/linux/tile/waitpid.S b/sysdeps/unix/sysv/linux/tile/waitpid.S deleted file mode 100644 index dee1b0c..0000000 --- a/sysdeps/unix/sysv/linux/tile/waitpid.S +++ /dev/null @@ -1,18 +0,0 @@ -/* -extern pid_t __waitpid_nocancel (pid_t, int *, int) attribute_hidden; -*/ -#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt) - -/* Call __NR_wait4, providing fourth argument (struct rusage *) as NULL. */ -#define PSEUDO_EXTRA move r3, zero; -#include - -PSEUDO (__waitpid, wait4, 3) -ret -PSEUDO_END(__waitpid) - -libc_hidden_def (__waitpid) -weak_alias (__waitpid, waitpid) -libc_hidden_weak (waitpid) - -#endif From patchwork Fri May 12 17:58:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 99715 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp431092qge; Fri, 12 May 2017 10:59:14 -0700 (PDT) X-Received: by 10.98.217.154 with SMTP id b26mr5845207pfl.136.1494611954880; Fri, 12 May 2017 10:59:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494611954; cv=none; d=google.com; s=arc-20160816; b=iBB4tnltJKZn+UBUflAUXX00Z0YjdjQgs1JeHC2TspSgtAAWZCDjjKB21/HkZ8EAiW l8m6qJUHxhWzfylw5KCXbhmRE3S+ZiSsNo9jQge0O4JCkg6zmwjbQN5GolqUY5P4OMnH nRuvmh6RU2hp0v7Z+1/YJ0+TTLIptH5nJJX85A2q7i++XeU132ulcjE3/+AA+kNcgZn6 xcwMeN5UoFRJkb5PsPIc+FcOYTPkIpp/67TxmQu7YQwB9gnlJY/orMusOr4AS/E57eBT 2hhrsQlpyhdtdqKZmDv+mGJOK2GkSiKxWF1whQjIlUbLoj+eJO0EsEW3+UpInC7FcNYi C9uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to: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=XYRwQLrs32iQq/MhT8gFAXJQj5j7JJNPG1LhHtv5NoU=; b=APVzNHj2cHFEPmgzGKmXB2ALSETBd8ZimEjDyY9f7/TlUttPfqKvLtW+ro8wkLx6zP ZhrSnsZRXBWtChVlcrfbRbr1hxe5z1Uni4ZILE+3xoNvcqTDc000WcqPeCDz5lXQXPLW k0tvwbiUgvu25gUXF4L4Tlg8Vs+OWIjRjrTlptkWEKouscE7ugz5lUWMH/BrWocAhp9/ IlfhNjh8z9/lB7WOkrpts63PRwNWAsNIy4YK0knfBqDFY6HJeh7nCURhTYLMCcwsSE8h nCfNaY1PS2WgCGmB59wl1pOxP3DuhASi1/4SXMQ+gZSd7zAKsKeNpv/gA8mqX/kvTU0V yKZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-79378-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79378-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 3si4152562plt.318.2017.05.12.10.59.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2017 10:59:14 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-79378-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; spf=pass (google.com: domain of libc-alpha-return-79378-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79378-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:in-reply-to :references; q=dns; s=default; b=Y2JVicKb6i15uAXMgA8fMmLCWC/Qels FAwVOAXRdId/Hw8UPEdB993oyWfGPDIqCnf0mI3utZCjU/BacHzftH2XzzZHy0oS 0KpvlJw6VG4lfjLf0vcS2RgUCdN8y+yXB5EdnxJ4hQfpcroyqPA+jSPxY3m8kwmc AOVmW4bGRnt8= 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:in-reply-to :references; s=default; bh=qWtyOdIAPv7X50n6d0TfPD5cdL0=; b=q9yxM 8TIb0pCgQaNCHOnjqJKa4mAGOIDV4iZ8AlLBxGNpJZiFCIJplKR3gggSrkUR5CZ9 SoOL28NMIPfrVpwqCk0Q8gtFLBONZ0cvsHiJ3Hw10/3Iyt1ehst2c/ljP9TQX/p5 i9MmEmy5ydXHR3S3J89NlND6Zp4S+8pZxT/ivo= Received: (qmail 39698 invoked by alias); 12 May 2017 17:58:28 -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 37800 invoked by uid 89); 12 May 2017 17:58:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL, 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=2327 X-HELO: mail-qk0-f172.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:in-reply-to :references; bh=XYRwQLrs32iQq/MhT8gFAXJQj5j7JJNPG1LhHtv5NoU=; b=T5QBm5/hSnPEeGrUmSTPPGKJS40r8ysnIYZlZvaJ6LjwOhIQhjpKmnb1KpvWKYh4Vk 4jsvIArLsJVhgAYcEZLASivntPy9rie37YP0h+1f+i0ynT2zut72IqmAwENYee61d7Gf zjYbQIPkzr2XqvqrtDUYjXegGPF3bnrI5IT8/vzVmMgu3U/VWgkFRIHNyl+5LX6qEwBT MfdHqtsLHUHUA8rqG7hK0z0NR6VFTbGi76/3f6h/HemIsDMcW4PliTdyoYhelyVFZL9K +VZNKbUWlvLnax4Udf4wEgrhNCU9uRq5Ho5rpSS6GSXR6NtaXZrnHXAHgLB3igPuFgPX DH9A== X-Gm-Message-State: AODbwcCaTKolh/3yOn5awr9HER3XiHpyuIn5pAgcB7m/KyPAYAyeJ4NA Izqs7ibjSrUHydLnP9mhJw== X-Received: by 10.55.15.200 with SMTP id 69mr5082416qkp.197.1494611903877; Fri, 12 May 2017 10:58:23 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 03/13] posix: Consolidate Linux nanosleep syscall Date: Fri, 12 May 2017 14:58:04 -0300 Message-Id: <1494611894-9282-3-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> References: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> This patch consolidates the nanosleep Linux syscall generation on sysdeps/unix/sysv/linux/nanosleep.c. It basically removes it from architectures auto-generation list. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu, sparc64-linux-gnu, and sparcv9-linux-gnu. * nptl/Makefile (CFLAGS-nanosleep.c): New rule. * posix/Makefile (CFLAGS-nanosleep.c): Likewise. * sysdeps/unix/sysv/linux/nanosleep.c: New file. * sysdeps/unix/sysv/linux/syscalls.list: Remove nanosleep from auto-generated list. --- ChangeLog | 6 ++++++ nptl/Makefile | 1 + posix/Makefile | 1 + sysdeps/unix/sysv/linux/nanosleep.c | 30 ++++++++++++++++++++++++++++++ sysdeps/unix/sysv/linux/syscalls.list | 1 - 5 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 sysdeps/unix/sysv/linux/nanosleep.c -- 2.7.4 diff --git a/nptl/Makefile b/nptl/Makefile index d39bb50..cdf69bd 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -216,6 +216,7 @@ CFLAGS-sendmsg.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-close.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-read.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-write.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-nanosleep.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-pt-system.c = -fexceptions diff --git a/posix/Makefile b/posix/Makefile index 0025d8a..9f186cd 100644 --- a/posix/Makefile +++ b/posix/Makefile @@ -232,6 +232,7 @@ CFLAGS-execle.os = -fomit-frame-pointer CFLAGS-execl.os = -fomit-frame-pointer CFLAGS-execvp.os = -fomit-frame-pointer CFLAGS-execlp.os = -fomit-frame-pointer +CFLAGS-nanosleep.c = -fexceptions tstgetopt-ARGS = -a -b -cfoobar --required foobar --optional=bazbug \ --none random --col --color --colour diff --git a/sysdeps/unix/sysv/linux/nanosleep.c b/sysdeps/unix/sysv/linux/nanosleep.c new file mode 100644 index 0000000..b352f84 --- /dev/null +++ b/sysdeps/unix/sysv/linux/nanosleep.c @@ -0,0 +1,30 @@ +/* Linux high resolution nanosleep implementation. + Copyright (C) 2017 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 + . */ + +#include +#include + +/* Pause execution for a number of nanoseconds. */ +int +__nanosleep (const struct timespec *requested_time, + struct timespec *remaining) +{ + return SYSCALL_CANCEL (nanosleep, requested_time, remaining); +} +libc_hidden_def (__nanosleep) +weak_alias (__nanosleep, nanosleep) diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index eab30dd..7fca6f8 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -42,7 +42,6 @@ mount EXTRA mount i:sssip __mount mount mremap EXTRA mremap b:ainip __mremap mremap munlock - munlock i:ai munlock munlockall - munlockall i: munlockall -nanosleep - nanosleep Ci:pp __nanosleep nanosleep nfsservctl EXTRA nfsservctl i:ipp nfsservctl pipe - pipe i:f __pipe pipe pipe2 - pipe2 i:fi __pipe2 pipe2 From patchwork Fri May 12 17:58:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 99713 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp430967qge; Fri, 12 May 2017 10:58:54 -0700 (PDT) X-Received: by 10.99.8.2 with SMTP id 2mr5763287pgi.18.1494611934185; Fri, 12 May 2017 10:58:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494611934; cv=none; d=google.com; s=arc-20160816; b=u246HAN9UWY63RYtHX/oA2tthQK0+vpAQ1Ps5OBNsKYK+o4UFnQi2IefMzsqU7UuAD H6kVL5aEWZM3+6uFRR4NSmVDpRmO3miw1rENM7caa4KT9MdV2a70NWPS/6LWVJW1dai+ akngqd8+MNG0/JkEfLPlQP3Wuedx2/0lcEwo+Qn6fIJuza0DWlloLmtd8Vd1VE7A9WBf ViTexlTLsj5tAWuLFUHw9LIdyaQ01f31RF7oSVCvgp1yGXu8E+iJb9cyjM46oU62Obf9 EFV1mHpdftOlSXa9bJ+I9dAuZ4dBRqLX1OXu/Arct+H/dxnXQpIa0Y6Bo/KSlP8aHOln LSkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to: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=iHoprd1Rce4dh2suAkBhId/VIwjCL1AhDo7E6NLGMqA=; b=lRTZ9lnRHNKICPuEtD4oQOtlYPjC+f2JGTQ5Mcq56nr2XMOycWfyeRO4N68IdvIIm/ DyL76OqabgvQhk0rg2mRl35TZcMNSWUMwU95FLQuiYq0XWw42mkUJmQP7vIgd5wyrDWX aR63C3IKikYKbmKwNT7Blh3r5b6zqXRf/1OzdtuknxvpUFh2VYSb+Lg+tyP+yncVakcd byd/ad03SbDUaP955amh/31COIr9LSysMIK4a9E6XrfU/T/JkT6r1vLe17J9D6c6y+f8 PIyl/zU6dqiBgmDjwiK5BEgBpdPJaz5hrtf2k0VGskHHN2HGBUb2SHyls3KGJlKMgxFI Mlrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-79376-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79376-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 o1si3983429pfg.277.2017.05.12.10.58.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2017 10:58:54 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-79376-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; spf=pass (google.com: domain of libc-alpha-return-79376-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79376-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:in-reply-to :references; q=dns; s=default; b=RdrNCfQFcgQ+Z9fLNFOtEuq8n0wwiA6 Va1+EaDp9o9MHmTmtm67cpKLSZrXek2SZjYVvlaun7MmysjlPixktfS0CuUKva8v Ij+a5ifvMZwABwArWraedhx9KdyWVSLo0kvQ607AnTs0y1NI0OG+uzlOOLX8t+RI Ofm2frY+kbdc= 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:in-reply-to :references; s=default; bh=x2Ikgutl8bnFvAGZSpcEKjSlrtQ=; b=booc4 FzGs8MauZqYZwtV4o3gLdKVtLsiHqN+eCV5XPNiY1a6LWqI0jDx6KmNeiLSGi+3Y 7OgbWEbXh+NDlLvRDeQyuukHBfsNiAxUpuxMrHic5eoKJ/tIHgenlyW20UQaqAQq XDmHY4Tjm/PhpN2lAyhK26zd9l7yaCYwqiy4Gs= Received: (qmail 39043 invoked by alias); 12 May 2017 17:58:27 -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 37805 invoked by uid 89); 12 May 2017 17:58:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL, 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-qk0-f180.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:in-reply-to :references; bh=iHoprd1Rce4dh2suAkBhId/VIwjCL1AhDo7E6NLGMqA=; b=gjF1QQjY1bQMyv27Z4nSIRHK4D7e0An1RsNz9vH7sxyUAc0Y6CP4hFjFhE+9ik2kRE nN6LO/uIgM2OU7sYK8T2Gp/CbbpsANUN6GzUqDTBoanuc4RK4ZL2rIh0Dba6r/PkMcpm UPqR/GqoIoPQTx8t4n1fYsO7P++TSIeLG06JMSCFev7xAcqzpaV5Y4tRBKbvYUkZaHWB RVzyCkd2YRSjZ+ZnRJhzcwcl42yqrSGKRBhWGaB1VGeO9WfrODY4yKJngkh+INeB1DRe OmVEShi3NnQkhmn+FkY8Zz0ijQNl9PUrakWHB2TJv/MVCB5NDcThTyyyKz8CYWV8iahH ePTw== X-Gm-Message-State: AODbwcBpKSjvJtsv7dWcTtBDLUJodabpgLRx7sJKaVRnJXpAaCS4vohX SkpMjNx3re3te/hzdTPQ+g== X-Received: by 10.55.4.4 with SMTP id 4mr4532329qke.253.1494611905223; Fri, 12 May 2017 10:58:25 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 04/13] linux: Consolidate Linux tee implementation Date: Fri, 12 May 2017 14:58:05 -0300 Message-Id: <1494611894-9282-4-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> References: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> This patch consolidates the tee Linux syscall generation on sysdeps/unix/sysv/linux/tee.c. It basically removes it from architectures auto-generation list. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu, sparc64-linux-gnu, and sparcv9-linux-gnu. * sysdeps/unix/sysv/linux/Makefile (sysdeps_routines): Add tee. * sysdeps/unix/sysv/linux/syscalls.list: Remove tee from auto-generated list. * sysdeps/unix/sysv/linux/tee.c: New file. --- ChangeLog | 5 +++++ sysdeps/unix/sysv/linux/Makefile | 2 +- sysdeps/unix/sysv/linux/syscalls.list | 1 - sysdeps/unix/sysv/linux/tee.c | 26 ++++++++++++++++++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/tee.c -- 2.7.4 diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index ad477f5..acdd04c 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -17,7 +17,7 @@ include $(firstword $(wildcard $(sysdirs:=/sysctl.mk))) sysdep_routines += clone umount umount2 readahead \ setfsuid setfsgid epoll_pwait signalfd \ eventfd eventfd_read eventfd_write prlimit \ - personality epoll_wait + personality epoll_wait tee CFLAGS-gethostid.c = -fexceptions CFLAGS-tst-writev.c += "-DARTIFICIAL_LIMIT=(0x80000000-sysconf(_SC_PAGESIZE))" diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index 7fca6f8..ae99acd 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -70,7 +70,6 @@ stime - stime i:p stime sysinfo EXTRA sysinfo i:p __sysinfo sysinfo swapon - swapon i:si __swapon swapon swapoff - swapoff i:s __swapoff swapoff -tee EXTRA tee Ci:iiii tee unshare EXTRA unshare i:i unshare uselib EXTRA uselib i:s __compat_uselib uselib@GLIBC_2.0:GLIBC_2.23 utime - utime i:sP utime diff --git a/sysdeps/unix/sysv/linux/tee.c b/sysdeps/unix/sysv/linux/tee.c new file mode 100644 index 0000000..3d503fb --- /dev/null +++ b/sysdeps/unix/sysv/linux/tee.c @@ -0,0 +1,26 @@ +/* Linux duplicating pipe content implementation. + Copyright (C) 2017 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 + . */ + +#include +#include + +ssize_t +tee (int src, int dest, size_t len, unsigned int flags) +{ + return SYSCALL_CANCEL (tee, src, dest, len, flags); +} From patchwork Fri May 12 17:58:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 99716 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp431168qge; Fri, 12 May 2017 10:59:25 -0700 (PDT) X-Received: by 10.84.234.8 with SMTP id m8mr7387718plk.41.1494611965716; Fri, 12 May 2017 10:59:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494611965; cv=none; d=google.com; s=arc-20160816; b=IRC4FQKxOtuezZJnENvXW+SlCCv6Aj0h6MNMVKButA7g+VYMWaCWeZKrI8KpEZHBMO e4FfB4OF0B8QaInTQPTUS39ZXaFB+aen1hiVViktvR+szN7Hz8foNw9HdgkfBeTFq5Rq g9diduOT+MsLd2Yp+YiRmgKak5OeKUAG7l6CAu9WGY3hwjd1m6PiU6ZsRC5iIraMuV4v 17Dt+65zkFaCJ26yGNSxnf7LxzSPT8sX/166QT5x7fxMB+fR7belT50EqKqhgYIHGCPI lWM3gdpqNJEe/BBygL/2UfMfe6PbYavdEhB7794NkOy5iKn/oDwozwxauQWm6rI4KUgd wulQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to: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=pG6YDEVsixKtbmHa7kLa+KdDe2bB0mGy55WHtenOnFg=; b=xcKh7GY8dtZhajOmgkS/w5zLXgOjZ6W9W9JfMR19LHl+Oow5WrLB8YghIKb43f1v25 V2FmMrAKo/OM6Qk9xyROWm0wapxmAEKzOGv7HAxK9i3weoEXFyz9FQIh9O33ioW+RZZw +4NzNcoHpcahsC/68KR8kO0VoFIVBseJB3LWjJg65o1szwbkFjMM3r3SOYuQwwu8TC5h BpIqrQqx9nR7XwGaa/9/aIqfP3H0Cu4zK+OhvuoJnduh5B1QuP5KF7XpNc/N9wUBU/jy Rll4PTOrgxt/SLRexQQBAKgg/SxpfYtPYg7Xzb/jlC+4ZzdD3/LU5f+E7gmeREOKXV1X EzNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-79379-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79379-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 g15si4005493pgp.346.2017.05.12.10.59.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2017 10:59:25 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-79379-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; spf=pass (google.com: domain of libc-alpha-return-79379-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79379-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:in-reply-to :references; q=dns; s=default; b=IbW0627eRzD40Ld1rJ7pt/dD5l2spnJ bi6XFs+Pj9xn4HleFg5kvCzkt9KHclg+JuD+mDhD7EAaU/Gef/t6SlbPSK+vXb1i 1r76cOXl0If36LCjd42roHnw61t5GJg0PWWsBNziWLZr5OPtx0Tp64qgdfi4PgqK zicrtJp0ecWY= 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:in-reply-to :references; s=default; bh=K1obgJ3414smc5j+rLvqycN4RcU=; b=RyJ1e mUd7oF2q7VUSWVdh56qXSd6GfV15tzj3Ljk2Qe3OlS58K21OsttUJmKQnhD7zMz2 lZ/TDSF0F51V/p4oxdOLppImANRW18JHGkAj6gLei7vMz+RyoqKrsoDK3UTWC9Ik Okfiaqs17LM/Kl5TOuCITYKn88phiIW3RPbnZA= Received: (qmail 39956 invoked by alias); 12 May 2017 17:58:28 -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 39282 invoked by uid 89); 12 May 2017 17:58:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL, 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=1995, 1512 X-HELO: mail-qt0-f170.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:in-reply-to :references; bh=pG6YDEVsixKtbmHa7kLa+KdDe2bB0mGy55WHtenOnFg=; b=JH8NZCfLJ7sxHAQ/7a67UOSoiX0l8goU/+RUS2c7+N3JeM5QU+BibMFZAnlQ57fUab XOEgzS5nrvFdN4lqpjAsqDBFcPmJVF9h+ThoaNlQF7R3DS0rum9aTixMGp0wU6H1mPkp QOc0IlV8hOS3Vrh+oaqXCNhRbsepl2wJ12xAHoGg7yuifhFtc4g/Kl/dz+U5+3/FnNui 8+qxU0PKRNeWl1yAu23IUKGTbaE8iz2ujB2lSYll52G/MnmHuZUyJGbhpwhAucDE/47/ 2wnCH/FozdQdmYgMAfaJmiUiUTg6cy2b+9uVIhpv/tB8qwyf9itx2tXEMI4iPEXx+AXL q1QQ== X-Gm-Message-State: AODbwcCwWN8ZPKHgBnZuolI+exSmSGjxBvgL536zXNl6vXrXku2vHDQH IA+2PMLro4gT2n1bp+DEHQ== X-Received: by 10.237.56.135 with SMTP id k7mr5398212qte.121.1494611906626; Fri, 12 May 2017 10:58:26 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 05/13] posix: Consolidate Linux sigsuspend implementation Date: Fri, 12 May 2017 14:58:06 -0300 Message-Id: <1494611894-9282-5-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> References: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> This patch consolidates the sigsuspend Linux syscall generation on sysdeps/unix/sysv/linux/sigsuspend.c. It basically removes the alpha assembly version which call the old sigsusped interface using only the first doubleword from sigset. Current minimum supported kernel on alpha (3.2) enforces rt_sigsuspend on the architecture (__ARCH_WANT_SYS_RT_SIGSUSPEND option on kernel), so it is possible to use the default implementation. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu, sparc64-linux-gnu, and sparcv9-linux-gnu. * sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Remove file. * sysdeps/unix/sysv/linux/sigsuspend.c: Simplify include list. --- ChangeLog | 3 +++ sysdeps/unix/sysv/linux/alpha/sigsuspend.S | 32 ------------------------------ sysdeps/unix/sysv/linux/sigsuspend.c | 4 ---- 3 files changed, 3 insertions(+), 36 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/sigsuspend.S -- 2.7.4 diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S deleted file mode 100644 index c226be1..0000000 --- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 1993-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David Mosberger , 1995. - - 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 - . */ - -/* sigsuspend is a special syscall since it needs to dereference the - sigset. This will have to change when we have more than 64 signals. */ - -#include - -#undef PSEUDO_PREPARE_ARGS -#define PSEUDO_PREPARE_ARGS ldq a0, 0(a0); - -PSEUDO(__sigsuspend, sigsuspend, 1) - ret -PSEUDO_END(__sigsuspend) -libc_hidden_def (__sigsuspend) -weak_alias (__sigsuspend, sigsuspend) -strong_alias (__sigsuspend, __libc_sigsuspend) diff --git a/sysdeps/unix/sysv/linux/sigsuspend.c b/sysdeps/unix/sysv/linux/sigsuspend.c index 8bb0cd4..df29abf 100644 --- a/sysdeps/unix/sysv/linux/sigsuspend.c +++ b/sysdeps/unix/sysv/linux/sigsuspend.c @@ -15,12 +15,8 @@ License along with the GNU C Library; if not, see . */ -#include #include -#include - #include -#include /* Change the set of blocked signals to SET, wait until a signal arrives, and restore the set of blocked signals. */ From patchwork Fri May 12 17:58:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 99717 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp431246qge; Fri, 12 May 2017 10:59:37 -0700 (PDT) X-Received: by 10.99.175.73 with SMTP id s9mr5635974pgo.196.1494611977021; Fri, 12 May 2017 10:59:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494611977; cv=none; d=google.com; s=arc-20160816; b=TNBnQ1dFObQ64dg81Rkviiopo6GNFGc1cCaZfS69RlsOfH12X6xOJDb6fEasEmc7KV PZ6dz3ix2AGRa8Hm3E8zpJKIYb0otDDtu2vjFKkZ7wvBO65ImnxUogUGMoMBurF6I7I1 Lig6BmQjBnnWKv9ft7bA9YWxYUwLcQpFSbiJ0QKGfmj8Fab4i8IyQ1nHivrNmmrJ69xn A0ket9Wjkdw1PC33OhOcCOVQTNkYSgsv5fyJhpRbjTcBQ39OEy+dzKPwjIBrou8E6JDq sy1WFGJQAcVDO5x+eS6sFXLYgkMcuv8qFt87eQwk77MoQYMRKI/YddVMGLp+tseYCGfB SMYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to: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=wP2Tqg1hnP3pv5YI7lFvnD0cauTXbE1gTrBniCE1kBE=; b=BAAV1nCTgvBOMvmTpngQYgauK1cuKH5KsL9/9oi0HSYS2iyEQ6PjvU+REQxxhJ7J3c 6iFirGrRLWdonPTI4E5lcFzAF90iibS/chpYnQCxA8P4uQ8j3aMnNcusdnir5n4CJYQe zJ2qlRhji/76astPVPyZQ+oegSl8UGtBXGVQDmhbhhVGDNAhb9SRWUpLxOr4sDKe1jbW jmyw/59G49akj5kFMmxvhRZ6hIF/TkoXfhyEa4A4lukYqs+lofmBIIG98ixwZSxvBqd3 amX5cR3bUguk85EnbN0jhmEpWHDXyYPYLvyFgPs8YeVOkDgM9OAZ7h4hNdZgaFZP1Xce qKEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-79380-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79380-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 c1si3828552pld.316.2017.05.12.10.59.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2017 10:59:37 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-79380-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; spf=pass (google.com: domain of libc-alpha-return-79380-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79380-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:in-reply-to :references; q=dns; s=default; b=l+vjbud/D4TgR1AffoQWnlTsT9c0W4m sDhdS2r5WvmJDMBa9pc2AYl8G64ZO0wAmHSj+ueOlyIgIthzAIPhYNSMOZCmJYf4 K4LJXgnmOrb0S/Uq8INAu+PYB7nqN6rJV/ABGEFXGz8q9Pdk6JNmVRjH77sjuton 7vzWNY61cpSg= 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:in-reply-to :references; s=default; bh=kbraVNzW8dqiHdPNdWXL8zT+NFs=; b=FL7pJ /8nRqLkLMYv/+lvo1XABGT5ZzgHqiqdBlalYKyzLziLDjFTS7sBw0KRTyDV8p0B6 wcxPZK6FvchjoBwy52L87WHLwCiY3BKglZlB8RlkWx6Y2UjzM7HBz2qoO1VsooKy V32AvCYvGy4iFsVK/p6eXtSNoSuE2Spkou4FbY= Received: (qmail 40597 invoked by alias); 12 May 2017 17:58:29 -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 40246 invoked by uid 89); 12 May 2017 17:58:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL, 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=pii X-HELO: mail-qk0-f178.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:in-reply-to :references; bh=wP2Tqg1hnP3pv5YI7lFvnD0cauTXbE1gTrBniCE1kBE=; b=CS1Sqy/6rKg0ufGNhv091bicTLXPCgaJRYghqSthZkQp3pfFegALBxPbewGqNs7FGO /a5aY/GqwfFL000c8QmzlYlO4zLSXLvVOV8lg1FcjGrQDxBUkQl4Dw33ePdZinR1ivYu Jto9xgUUlTpbdDn0ES3PGdKvzN2Q8/X09vjGtLCoKvqivsmx/jeLuTEfYdFMSgcJvUHE OMpOowtmJZrdrWWmu6jEINWp3g2hSR2nc9tQtqJDdwfBMOnbVIiHzGERRUmVjN/lzCM8 UXghwnYgYU6eGByG0nT44HgSQ4NLjSEjExIGcF2DiSlcqqccy6vpW1xOnExNLpZUv+1j /Z5Q== X-Gm-Message-State: AODbwcBBZr7GqVGDP1j+H6IVp5EBBpj7sMPM5TgFosYsE8RNYJXfi3dh FWO6dxYxKsOjrnt54jN5pQ== X-Received: by 10.55.66.80 with SMTP id p77mr4571978qka.225.1494611908033; Fri, 12 May 2017 10:58:28 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 06/13] posix: Consolidate Linux msync syscall Date: Fri, 12 May 2017 14:58:07 -0300 Message-Id: <1494611894-9282-6-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> References: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> This patch consolidates the msync Linux syscall generation on sysdeps/unix/sysv/linux/msync.c. It basically removes it from architectures auto-generation list. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu, sparc64-linux-gnu, and sparcv9-linux-gnu. * misc/Makefile (CFLAGS-msync.c): New rule. * nptl/Makefile (CFLAGS-msync.c): Likewise. * sysdeps/unix/syscalls.list: Remove msync from auto-generation list. * sysdeps/unix/sysv/linux/msync.c: New file. --- ChangeLog | 5 +++++ misc/Makefile | 1 + nptl/Makefile | 1 + sysdeps/unix/syscalls.list | 1 - sysdeps/unix/sysv/linux/msync.c | 26 ++++++++++++++++++++++++++ 5 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 sysdeps/unix/sysv/linux/msync.c -- 2.7.4 diff --git a/misc/Makefile b/misc/Makefile index 91e425b..8536255 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -108,6 +108,7 @@ CFLAGS-getsysstats.c = -fexceptions CFLAGS-getusershell.c = -fexceptions CFLAGS-err.c = -fexceptions CFLAGS-tst-tsearch.c = $(stack-align-test-flags) +CFLAGS-msync.c = -fexceptions # Called during static library initialization, so turn stack-protection # off for non-shared builds. diff --git a/nptl/Makefile b/nptl/Makefile index cdf69bd..875ab3d 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -217,6 +217,7 @@ CFLAGS-close.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-read.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-write.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-nanosleep.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-msync.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-pt-system.c = -fexceptions diff --git a/sysdeps/unix/syscalls.list b/sysdeps/unix/syscalls.list index 2254c76..c4135d8 100644 --- a/sysdeps/unix/syscalls.list +++ b/sysdeps/unix/syscalls.list @@ -45,7 +45,6 @@ madvise - madvise i:pii __madvise madvise mkdir - mkdir i:si __mkdir mkdir mmap - mmap b:aniiii __mmap mmap mprotect - mprotect i:aii __mprotect mprotect -msync - msync Ci:aii __libc_msync msync munmap - munmap i:ai __munmap munmap open - open Ci:siv __libc_open __open open profil - profil i:piii __profil profil diff --git a/sysdeps/unix/sysv/linux/msync.c b/sysdeps/unix/sysv/linux/msync.c new file mode 100644 index 0000000..28aba11 --- /dev/null +++ b/sysdeps/unix/sysv/linux/msync.c @@ -0,0 +1,26 @@ +/* Linux synchronize a file with a memory map implementation. + Copyright (C) 2017 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 + . */ + +#include +#include + +int +msync (void *addr, size_t length, int flags) +{ + return SYSCALL_CANCEL (msync, addr, length, flags); +} From patchwork Fri May 12 17:58:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 99718 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp431353qge; Fri, 12 May 2017 10:59:52 -0700 (PDT) X-Received: by 10.98.86.74 with SMTP id k71mr5830846pfb.13.1494611992418; Fri, 12 May 2017 10:59:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494611992; cv=none; d=google.com; s=arc-20160816; b=pt1DkEh3S3Ct2WLrB2NstBzKqv7V0/YhZ3eUFnxiBuCmU4jjB8tvaJ3jTNeoK9nONf xDHNn8Ir+zzF2CD4oMORgISWQwWLYmBoxbjAGW0B0Gxt6+nAdh6crekj6qS8ZLPuaxJj lLpT4Kz1HTCYqxDnnT6IP3KL0BNOXf3FHtEgRXpKJmJMfvuDj+Lg6pOUt86rtbopROTE 57MM1odKO+32CbKK9vDH+SJcEyVyLz18fEn9+KOu2azcI4aorvm+Djfn5XvmdhMdi0U2 HJopobCavSJlAMH1GB6LfshXU7B1Vf5BuRJEjweOlDeJEsn5rxhOGPtVxeSWib5q+w4o rR+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to: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=wUVOq6fW02S3GclUUbnS9HAJnEIw1gS42Dax780RlNg=; b=qQpYwJOviLtGmnOktX1tkf4W9drdwV4+iUReMFJ50dTwHcS/jg2osvJpixMbEebtZy zeHdFiFiCyhL/3dGj6uRaDrzbzL5nY5PheWe7C6xaT1udVhMwXay9iNXab9xO7bSj2or 7T1HiYLpqMXyObNrf/yBqmaPOteuwsGROWjlPPtshYeH7eo8tWMDWu04LTdI3sHtHGqy XvQacgwU27LIE3gz+GYyf0lxp5DRYKdjtp8EZIpz+IaV622UG0K0CQdOPll65AZ6COlu 7JHVTPfjE59p+S0XsErLN6FErrO5L1jrzWPM8cAo2akCecG/LV25LLxp/1oWtC39xPCq EP+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-79381-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79381-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 e185si4014802pfe.317.2017.05.12.10.59.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2017 10:59:52 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-79381-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; spf=pass (google.com: domain of libc-alpha-return-79381-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79381-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:in-reply-to :references; q=dns; s=default; b=NUBtSyQT1FQCAh892NWO7TrCaBk3xFI 9V6Dw7S7fyYmRL7JsSZF+9C8LhJw5RC0TjzANzpVRCUSdKZA6ko7ZYArXE8ILv1K IGJg/WE7TUJIwJWovDZcL+J0rIpz9PhNlvisHwDzC/CppE9e90CAQ0vN4Xv5E/Ty 5oWmHha6m0/s= 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:in-reply-to :references; s=default; bh=T4xPfJ4Wn54E9oWS/TM55+mkZPw=; b=nPgNK hdrTEiSTZ8j5Q2t1G24SBPiUfSURJal9iM/Urvi/CIKeelfNyH9EsNkCf8Xlw7az U8mkiIT8Xx3YOwdVnGBBrEjoDhC8YVizhkZ2L3G4qvTmDwkmtKbmbwH+x9+/YA3n yqD6KQjoCRjrPcVHcivI1ITRBXdYXsOiqq2nWs= Received: (qmail 41840 invoked by alias); 12 May 2017 17:58:31 -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 41431 invoked by uid 89); 12 May 2017 17:58:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL, 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=media X-HELO: mail-qk0-f176.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:in-reply-to :references; bh=wUVOq6fW02S3GclUUbnS9HAJnEIw1gS42Dax780RlNg=; b=oCqBRWTMCFJnFvlUoeWci/0CM9qOc0HRLD/KqB7sdnSdWdjoP24enb+4/ibvlSJICN 2btr0aIBmw+0OgTmjyoCam0+xbQe0a5UfaPbuyDz4SJoL1FtjEXed19O8b+amWxarBvY bhl6+sFGr889S6goHQsKz/acBVv/SI3Pw2a47LS+zPXEp1Z+UT02fuYmIEkZFY7dD5sB i3RH4ztiFvLnN5Zuj89iy4u+CCPemnxNK+7VkaeYIYdhKHIwPtlhV+le+00wXlSPiWna z03h0Y0OBOaa2068MG1liNclMgbISpE4kqIKOAkDJM6GNfe1dpizc4maQY++pOo0rHqA N9KQ== X-Gm-Message-State: AODbwcB4cs0LtWg/Ae2mdgd33nzrztlf3O+0cGXyxRZZCKru1nE/9w3r OqRYy1Pqx9RDHi3vJjabCg== X-Received: by 10.55.42.220 with SMTP id q89mr4793531qkq.211.1494611909430; Fri, 12 May 2017 10:58:29 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 07/13] posix: Consolidate Linux fdatasync syscall Date: Fri, 12 May 2017 14:58:08 -0300 Message-Id: <1494611894-9282-7-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> References: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> This patch consolidates the fdatasync Linux syscall generation on sysdeps/unix/sysv/linux/fdatasync.c. It basically removes it from architectures auto-generation list. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu, sparc64-linux-gnu, and sparcv9-linux-gnu. * misc/makefile (CFLAGS-datasync.c): New flag. * nptl/makefile (CFLAGS-datasync.c): Likewise. * sysdeps/unix/sysv/linux/syscalls.list (fdatasync): Remove from auto-generation syscall list. * sysdeps/unix/sysv/linux/fdatasync.c: New file. --- ChangeLog | 6 ++++++ misc/Makefile | 1 + nptl/Makefile | 1 + sysdeps/unix/sysv/linux/fdatasync.c | 29 +++++++++++++++++++++++++++++ sysdeps/unix/sysv/linux/syscalls.list | 1 - 5 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 sysdeps/unix/sysv/linux/fdatasync.c -- 2.7.4 diff --git a/misc/Makefile b/misc/Makefile index 8536255..2f1ddef 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -109,6 +109,7 @@ CFLAGS-getusershell.c = -fexceptions CFLAGS-err.c = -fexceptions CFLAGS-tst-tsearch.c = $(stack-align-test-flags) CFLAGS-msync.c = -fexceptions +CFLAGS-fdatasync.c = -fexceptions # Called during static library initialization, so turn stack-protection # off for non-shared builds. diff --git a/nptl/Makefile b/nptl/Makefile index 875ab3d..879efbb 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -218,6 +218,7 @@ CFLAGS-read.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-write.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-nanosleep.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-msync.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-fdatasync.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-pt-system.c = -fexceptions diff --git a/sysdeps/unix/sysv/linux/fdatasync.c b/sysdeps/unix/sysv/linux/fdatasync.c new file mode 100644 index 0000000..09a07fb --- /dev/null +++ b/sysdeps/unix/sysv/linux/fdatasync.c @@ -0,0 +1,29 @@ +/* Synchronize a file's in-core state with storage device Linux + implementation. + Copyright (C) 2017 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 + . */ + +#include +#include + +/* Synchronize at least the data part of a file with the underlying + media. */ +int +fdatasync (int fd) +{ + return SYSCALL_CANCEL (fdatasync, fd); +} diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index ae99acd..c69eff4 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -13,7 +13,6 @@ epoll_create1 EXTRA epoll_create1 i:i epoll_create1 epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl eventfd EXTRA eventfd2 i:ii eventfd execve - execve i:spp __execve execve -fdatasync - fdatasync Ci:i fdatasync flock - flock i:ii __flock flock get_kernel_syms EXTRA get_kernel_syms i:p __compat_get_kernel_syms get_kernel_syms@GLIBC_2.0:GLIBC_2.23 getpid - getpid Ei: __getpid getpid From patchwork Fri May 12 17:58:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 99719 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp431447qge; Fri, 12 May 2017 11:00:04 -0700 (PDT) X-Received: by 10.99.107.201 with SMTP id g192mr5728703pgc.149.1494612004594; Fri, 12 May 2017 11:00:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494612004; cv=none; d=google.com; s=arc-20160816; b=uDTOkeeCJH4PafxclQjdFWHV2Mle1b/bl4bMXhGNWv6L0dhKwE1f30+f6P0vHp8GCB YGdnHhQNVLqrJZV00Gl13R4nn0Dcj+eq9LQF64GDAeAxoFjEOzPs6yQCc8TLxpjWRTqR cUgsJ93xbZj7hLOdv/wz2O6oA45bI4ISzz/wgjO8oh/cwMYTEJrsecxkwJzA/iCUtqyk QwUaeak1vh5tLS3NI00vIODSnjuv3jW3NugsXxczbeRmQR/semCvvwRtW4ceuFcSHX6F TTXWCV5upc+e1s2yyL77w0MMXapuot4X3PQUGusgi30yxS+08iWNKtqBXoseb6MKqUNl iakQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to: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=/EjH1YMwJnBgbYGw6RWcbyOlXMhHZgII3SqZEkuskS0=; b=wcTRBURwKiIlUKw6Qzam3NN7n3DZTdTmsQmqtd979r6YWzGtu3CtIZUNL5YFW873kq hp4xNYKemNYwVY6OFt4uWlm6DNeos2hbYf2oPsvCLjFa8IbmB9bReeSO/26rXUgJ/Kk7 gz1XxBmmxlPxbR/NDBOlRor0iLUmD4klwPdDV85OX+TWQokQ34pe7HEAxwP0qAoSMpy7 cbHkpMzhs/+2eyZMxPkbMiLk5l+pQYoHJMMF2312eSifYZw2Zw+FEoSp0XAg0EcDyTIN BYmPrs3xnGFikSdcmK6l/idk09i/GCc8ZRbO/w96l1IHcieyTSSqrdQvpEeqSqBCJlNy z2sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-79382-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79382-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 z84si3981295pfk.178.2017.05.12.11.00.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2017 11:00:04 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-79382-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; spf=pass (google.com: domain of libc-alpha-return-79382-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79382-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:in-reply-to :references; q=dns; s=default; b=X6Ddd/DBFKPo6gkFnzszn/h8fZxLoMQ Zg5hlVZuO8WAorcL98eQMw6+ofE+XVHRtuKtefvAEU77BzTwrB/VduAG13ovhq11 YR3BjHtkZC0XhByVWl3jPaE5htFNHP9gLUiNx0kuZSneJSM+lTBCCqm9b1BuU42A rTYo+lqgKELY= 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:in-reply-to :references; s=default; bh=VjfOf1YNtbNDqNbdNs5EsCDW4kw=; b=ccjXl 1NhuY1FwOEwPrQ+YdNdRN7RvaJfxU1fUYx1+p5bCh9VXYlp4vUNdpyTRhxog3+GV pDIPkDBnMwqrGUcsmgLLZpOYF8GDax/JU0rBeIa+gRcTJGEki4wi2U98KGuxfF+W UyqCVHNMCvnkNEpasddQauW1r4Ij1WpJLobedw= Received: (qmail 43012 invoked by alias); 12 May 2017 17:58:33 -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 42718 invoked by uid 89); 12 May 2017 17:58:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL, 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-qk0-f171.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:in-reply-to :references; bh=/EjH1YMwJnBgbYGw6RWcbyOlXMhHZgII3SqZEkuskS0=; b=pTX7/vZAqML9PtVz5FaH07Oin/13XGi+gnq23i36+h6EoCcyHpcrqbpmufWzKtOmEP DC5u+oUvJaIisYw9wAsdGPnE6y9DwprNa9x5E1TVzSAvR2ygR6fBDkxXNgYXfK1ogmbb zWasFeqD9fwksVvTS/EnRv2tkEpiUl+5qxerwB3k3EkUmlo71J1gNBeCQoyaAyJlEyQx Nz5TwgN6tAXOyW8s4DI47/8h02QefiEbenumONgxJQbULGOWyY2x6wH6QKCmyQURik29 YqXDLp+8wI46HgwODyo0lJXb1eXk3HgVAI1ZC690WzzvgSfzYnilocR6bSjvto/SAV0Q QnVg== X-Gm-Message-State: AODbwcCXapckS2huDvKZWg+veV8Wp0DMWIeraQsnioyE6WydBbLRgox7 +Q5j7s2BvmuIQqDEKQPDxw== X-Received: by 10.55.49.11 with SMTP id x11mr5293710qkx.12.1494611910860; Fri, 12 May 2017 10:58:30 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 08/13] posix: Consolidate Linux fsync syscall Date: Fri, 12 May 2017 14:58:09 -0300 Message-Id: <1494611894-9282-8-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> References: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> This patch consolidates the fsync Linux syscall generation on sysdeps/unix/sysv/linux/fsync.c. It basically removes it from architectures auto-generation list. For arm it also removes the __errno_location call since fsync is not called with SYSCALL_CANCEL with call arch-specific INLINE_SYSCALL macro which in turn will call __set_errno macro (and setting errno directly). Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu, sparc64-linux-gnu, and sparcv9-linux-gnu. * misc/Makefile (CFLAGS-fsync.c): New flag. * nptl/Makefile (CFLAGS-fsync.c): Likewise. * sysdeps/unix/syscalls.list (fsync): Remove from auto-generation syscall list. * sysdeps/unix/sysv/linux/fsync.c: New file. * sysdeps/unix/sysv/linux/arm/localplt.data [libpthread.so] (__errno_location): Remove. --- ChangeLog | 8 ++++++++ misc/Makefile | 1 + nptl/Makefile | 1 + sysdeps/unix/syscalls.list | 1 - sysdeps/unix/sysv/linux/arm/localplt.data | 1 - sysdeps/unix/sysv/linux/fsync.c | 28 ++++++++++++++++++++++++++++ 6 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/fsync.c -- 2.7.4 diff --git a/misc/Makefile b/misc/Makefile index 2f1ddef..d58ff5c 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -110,6 +110,7 @@ CFLAGS-err.c = -fexceptions CFLAGS-tst-tsearch.c = $(stack-align-test-flags) CFLAGS-msync.c = -fexceptions CFLAGS-fdatasync.c = -fexceptions +CFLAGS-fsync.c = -fexceptions # Called during static library initialization, so turn stack-protection # off for non-shared builds. diff --git a/nptl/Makefile b/nptl/Makefile index 879efbb..9eedce2 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -219,6 +219,7 @@ CFLAGS-write.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-nanosleep.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-msync.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-fdatasync.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-fsync.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-pt-system.c = -fexceptions diff --git a/sysdeps/unix/syscalls.list b/sysdeps/unix/syscalls.list index c4135d8..61e5360 100644 --- a/sysdeps/unix/syscalls.list +++ b/sysdeps/unix/syscalls.list @@ -19,7 +19,6 @@ fchmod - fchmod i:ii __fchmod fchmod fchown - fchown i:iii __fchown fchown fcntl - fcntl Ci:iiF __libc_fcntl __fcntl fcntl fstatfs - fstatfs i:ip __fstatfs fstatfs -fsync - fsync Ci:i __libc_fsync fsync ftruncate - ftruncate i:ii __ftruncate ftruncate getdomain - getdomainname i:si getdomainname getgid - getgid Ei: __getgid getgid diff --git a/sysdeps/unix/sysv/linux/arm/localplt.data b/sysdeps/unix/sysv/linux/arm/localplt.data index 8bc876d..19d3299 100644 --- a/sysdeps/unix/sysv/linux/arm/localplt.data +++ b/sysdeps/unix/sysv/linux/arm/localplt.data @@ -5,7 +5,6 @@ libc.so: memalign libc.so: raise libc.so: realloc libm.so: matherr -libpthread.so: __errno_location libpthread.so: raise # The dynamic loader needs __tls_get_addr for TLS. ld.so: __tls_get_addr diff --git a/sysdeps/unix/sysv/linux/fsync.c b/sysdeps/unix/sysv/linux/fsync.c new file mode 100644 index 0000000..ac4827b --- /dev/null +++ b/sysdeps/unix/sysv/linux/fsync.c @@ -0,0 +1,28 @@ +/* Synchronize a file's in-core state with storage device Linux + implementation. + Copyright (C) 2017 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 + . */ + +#include +#include + +/* Make all changes done to FD actually appear on disk. */ +int +fsync (int fd) +{ + return SYSCALL_CANCEL (fsync, fd); +} From patchwork Fri May 12 17:58:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 99720 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp431629qge; Fri, 12 May 2017 11:00:24 -0700 (PDT) X-Received: by 10.99.168.1 with SMTP id o1mr5568056pgf.105.1494612024126; Fri, 12 May 2017 11:00:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494612024; cv=none; d=google.com; s=arc-20160816; b=NoEZDGp+gk/YKg3lmOIuzUnTBbSJcdWSTA8dqe+SYHJocS6C0hIpw8+ntzfXXMmVw3 5weJSA4B1yrN/j/Wc19Bu4n/5DubFdVsf0JERfEyTf7Ha6mkg9eStLD1BzU1ORJXdYKH g435bsBJL06x90hAIuNCbjXqTMLGr+0KSmWV2B8+j3YQ7qzEdCsowuKEn1SkH4copsjj NfdvhNUYyLiNV/KpR3UyZjb+/LizLsCUochxiUJI7CIBypX1OxmbWtq9Rm5Aqxrp9wBf 9woU3r8VyrrbZGxSCkjCs0hKrHx29yub8TJc1DfOI4wu2J9UDM0yRA8b0kLA99xgaem2 BBNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to: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=tgnSZWwyTUAiEvmn0n/ceZgMAyJdY5Z5NTM1G/AIM1M=; b=iV/VemDB/WRoGDSGg9hPK5vER8q1lJP1mF9y38y0PDdmMeFbLiDOCwdAJMb2NNfgJ/ MCyJAStnKezijvFKc6hnQsiCqjEQopu2omyE9bC235dtfGblm/yVpbWTTNVgjARKaCGs p6siMwgfdip4pfRlG4zPXFYoawLm99VRcxx7d0UnKdsahj6KpLDT0EKBAEGRWIIxNtlo UFEeiHZrsNu+x3iIpIpXIhR9c9rEPLm9PJOSupAl6LPJkKyysTqH73+fxrO1OhY6jiaI okP7NVhj+u4YgV6L/Z3zmOTMeYMzZynLQmoQhPaOgomrdoSY5i5ts5WdgWV2bczy1Jri FtwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-79383-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79383-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 a5si3792514plh.187.2017.05.12.11.00.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2017 11:00:24 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-79383-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; spf=pass (google.com: domain of libc-alpha-return-79383-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79383-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:in-reply-to :references; q=dns; s=default; b=O1p6rOIZAfej7NvPWf0vZRef790SS+T MFt2I39q4j0IrZyqoI5bkEbbsqm8JCCebRj8fJGnMvUgUzdyIPgDrhd2hvhiwMer z08UTo9MdcNuczAdq+qscNgfOhsJ9KH7xPpV+C74+4Ph9wpR9IGHfKYhsok4yk+L wye3c0tXgJy4= 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:in-reply-to :references; s=default; bh=eM1PJ3qhmfHOPGkAnIn1kxu/a60=; b=TlzVh sWf4drGMTBX+tduWiOXYk6yxZf3+6clq63afFDk5YQsHkoKrAg2dbM1zUSDLCyUo eIbZSWSlWIIuUE0o8LkLKzuUatN7YANfr3/JsEY128UCKEYnjgwRoSTe3MmxL9Yb RKblgeFF0oTeoHagTN1xE5+DyVHAQ4TU4fNBeo= Received: (qmail 43651 invoked by alias); 12 May 2017 17:58:35 -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 43312 invoked by uid 89); 12 May 2017 17:58:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL, 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-f177.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:in-reply-to :references; bh=tgnSZWwyTUAiEvmn0n/ceZgMAyJdY5Z5NTM1G/AIM1M=; b=PYehI0r2QwreNi4P6qxAUAlYCtHSFcM26W0iZV1F+uL+N7/OZMtBnU3OHZmx6qnEpv ZQ62aH/rzS9rF7zfna9i1KV/TdUAhd210c1XGTR70QEfeoZPRqOrTB7g7xgN4qkPfKhE 0tTotQr1L6gvSqpuBzolKz8wAlzmSZr5oAoCkfYXun/uw1guVK8qExUZaVadsLtCsSgY RpniIy9Qe4npVqUC8vQNl+2oClrzBMtk0wTFQl8NTYwz0V6GtlYKGB9Wui9M7Zb1eCaI ZJ8mw4RWnDR1UE1ZMdR+gKccaPxAny/Jk8ixNzc6W1f39x9NHKWJuixp1s5SQfmle6ry roeQ== X-Gm-Message-State: AODbwcA3Qi2WQn3RgbsqHLqdEK5N569uYIlrnntVIJAAlapJvCAcoxi0 pi3epE5iI2isLAJ+cniLSQ== X-Received: by 10.200.35.110 with SMTP id b43mr5020483qtb.24.1494611912238; Fri, 12 May 2017 10:58:32 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 09/13] linux: Consolidate Linux vmsplice syscall Date: Fri, 12 May 2017 14:58:10 -0300 Message-Id: <1494611894-9282-9-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> References: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> This patch consolidates the vmsplice Linux syscall generation on sysdeps/unix/sysv/linux/vmsplice.c. It basically removes it from architectures auto-generation list. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu, sparc64-linux-gnu, and sparcv9-linux-gnu. * sysdeps/unix/sysv/linux/Makefile (CFLAGS-vmsplice.c): New flag. * sysdeps/unix/sysv/linux/syscalls.list (vmsplice): Remove from auto-generation syscall list. * sysdeps/unix/sysv/linux/vmsplice.c: New file. --- ChangeLog | 5 +++++ sysdeps/unix/sysv/linux/Makefile | 2 +- sysdeps/unix/sysv/linux/syscalls.list | 1 - sysdeps/unix/sysv/linux/vmsplice.c | 27 +++++++++++++++++++++++++++ 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/vmsplice.c -- 2.7.4 diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index acdd04c..492963b 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -17,7 +17,7 @@ include $(firstword $(wildcard $(sysdirs:=/sysctl.mk))) sysdep_routines += clone umount umount2 readahead \ setfsuid setfsgid epoll_pwait signalfd \ eventfd eventfd_read eventfd_write prlimit \ - personality epoll_wait tee + personality epoll_wait tee vmsplice CFLAGS-gethostid.c = -fexceptions CFLAGS-tst-writev.c += "-DARTIFICIAL_LIMIT=(0x80000000-sysconf(_SC_PAGESIZE))" diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index c69eff4..9d7bd65 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -72,7 +72,6 @@ swapoff - swapoff i:s __swapoff swapoff unshare EXTRA unshare i:i unshare uselib EXTRA uselib i:s __compat_uselib uselib@GLIBC_2.0:GLIBC_2.23 utime - utime i:sP utime -vmsplice EXTRA vmsplice Ci:iPii vmsplice wait4 - wait4 i:iWiP __wait4 wait4 chown - chown i:sii __libc_chown __chown chown diff --git a/sysdeps/unix/sysv/linux/vmsplice.c b/sysdeps/unix/sysv/linux/vmsplice.c new file mode 100644 index 0000000..01dac13 --- /dev/null +++ b/sysdeps/unix/sysv/linux/vmsplice.c @@ -0,0 +1,27 @@ +/* Splice user pages into a pipe Linux implementation. + Copyright (C) 2017 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 + . */ + +#include +#include +#include + +ssize_t +vmsplice (int fd, const struct iovec *iov, size_t count, unsigned int flags) +{ + return SYSCALL_CANCEL (vmsplice, fd, iov, count, flags); +} From patchwork Fri May 12 17:58:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 99721 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp431734qge; Fri, 12 May 2017 11:00:34 -0700 (PDT) X-Received: by 10.98.252.8 with SMTP id e8mr5988145pfh.190.1494612034508; Fri, 12 May 2017 11:00:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494612034; cv=none; d=google.com; s=arc-20160816; b=XfzRlm3b+LBUxkVOaI9N9Bc9c3b1VtlcK25A1suze+J+9dzp6ly1fBk7W5zEZwnLiP 3TArd0OU/49PCB8lIDU9CYtB5+fTbW+BaFJlOnhs+LebnbXQQvvjkPCslIHZeAy1KSGS PzFQF0PSaGEUfGOwmCYCIakSMVpgNvEc0uCCn8skVR+bwVKDUwAVTXdqWHwrggKB0Z8H 3ehVkToOglE5u3zg8s1P7LvmgZ6/zGtAWKGEDIF6DpDw1HclMXDSaBqi3tLewUmdmrIb GVKL+kV1J4vd+j2BEtOwqufuEg4EdZ/I3oyjeCJlhd9fJniIFDmnRyM6qQzrC9pa7F2x 49UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to: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=ootIxyG3tLdxf4NUuyjPy898JY44pXKOQwrFJMUyF2c=; b=rl3ulOt2hzU0duF3ec2P5cz8R3FrpkHOZwjoRfky+ygSJc4lr2IQM+qmDZ+RllFWtm i9gCiKImNyltApJUqavvBE/eCPQ0fFhcHooV4N8PLdNhSkYJBfwFfxkrWyg2EPwjQWPr n0x/uGT4fo9PLVg0XRA7yra6rvtFZtCWWkBGyR2CaIZeEvJL2gzwRo/kKydHh6VDP/9y vaQU2G5NDOTsn804/K86OIzrjo8m7wWI2UdKpjMvufQUdGvjWNqQn+0dbAE2igSG79cb eTPknluxy6UNyQ7f+VKeK6WQFbBkkIIpJPQFvjRAza4eMlVVRWWMcd9LeQhgEhK8Omun gNXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-79384-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79384-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 z61si3771317plb.68.2017.05.12.11.00.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2017 11:00:34 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-79384-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; spf=pass (google.com: domain of libc-alpha-return-79384-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79384-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:in-reply-to :references; q=dns; s=default; b=ue7+09YZXOc2KWL4wTVxdPyBrHpRtvS yt8DYcc2ZWQSMQ3EA7YjmyhwCs5/02rO914f79a2srgGU3PNK5OgPtMVUzosIf3c fWkVGD4Ugy7VxrNIm7kcdwu4o+qH8+gUqI+uDG+kTZaYS6i0iYDifzAQcaQL5y8D Z+Di5k53eSO8= 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:in-reply-to :references; s=default; bh=Wn1KV5kxXMD5CT6pil/aRjW04Xg=; b=myzZq 1274leUfRj9xq5bW3Km0E6Ij5V1dPTZUiltW6s0BGGYIQc6Y7iAHBoRXR7Q/0NVK iwiOFVxI+PfZoirzo5+/D2yJyHQgNKXVS5YyVlFpz+SnWuBY82WOVO1Vwf+jmllk YRgcsYjs8P1+hySLM+gQGPCjy9GRd/TUrDE5M4= Received: (qmail 44049 invoked by alias); 12 May 2017 17:58:35 -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 43574 invoked by uid 89); 12 May 2017 17:58:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL, 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-f176.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:in-reply-to :references; bh=ootIxyG3tLdxf4NUuyjPy898JY44pXKOQwrFJMUyF2c=; b=OMPY8az6fRGHwaCqFWGJThN/gJFz0+8gB5gQACMCDPUWzOLcUMuTxSeh+Ul3iXN5fu cAhmZpl5Y5oLaJnd6860ffoTga5sW4APmzyU5z7VjeFFwKJ9h93aYoA32UF6xppBQs8n 7H9+vqeEzalPljheF8Sf/ACbamOKuWs+ehxz+KjH+ttSR5geecbn6UCQBxh/sEjKyUst T25o12qPEh7hQ9cNWBbemmb1SIAq2nWCPPdDIEeTp5BdIJuEOFqH50DQuE46ngkyjX1k Oa7sQnN9YHr5PTSCd2tzMVvhoG9HZ1HDPVuWAyO7Kf6fjQIBcLcAnHR0Er+Fjln5q9NF 3rmA== X-Gm-Message-State: AODbwcBQXbpFgko48U10qsnD31Lpo4DhjmvG0omsMZwx1zqmsB2W0mXE dfNZ0HiW+hNCoU9QVW7EpA== X-Received: by 10.200.46.140 with SMTP id h12mr2944873qta.224.1494611913545; Fri, 12 May 2017 10:58:33 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 10/13] linux: Consolidate Linux splice syscall Date: Fri, 12 May 2017 14:58:11 -0300 Message-Id: <1494611894-9282-10-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> References: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> This patch consolidates the splice Linux syscall generation on sysdeps/unix/sysv/linux/splice.c. It basically removes it from architectures auto-generation list. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu, sparc64-linux-gnu, and sparcv9-linux-gnu. * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add splice. (CFLAGS-splice.c): New flag. * sysdeps/unix/sysv/linux/splice.c: New file. * sysdeps/unix/sysv/linux/syscalls.list (splice): Remove from auto-generation syscall list. --- ChangeLog | 6 ++++++ sysdeps/unix/sysv/linux/Makefile | 2 +- sysdeps/unix/sysv/linux/splice.c | 27 +++++++++++++++++++++++++++ sysdeps/unix/sysv/linux/syscalls.list | 1 - 4 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/splice.c -- 2.7.4 diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index 492963b..578f9e4 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -17,7 +17,7 @@ include $(firstword $(wildcard $(sysdirs:=/sysctl.mk))) sysdep_routines += clone umount umount2 readahead \ setfsuid setfsgid epoll_pwait signalfd \ eventfd eventfd_read eventfd_write prlimit \ - personality epoll_wait tee vmsplice + personality epoll_wait tee vmsplice splice CFLAGS-gethostid.c = -fexceptions CFLAGS-tst-writev.c += "-DARTIFICIAL_LIMIT=(0x80000000-sysconf(_SC_PAGESIZE))" diff --git a/sysdeps/unix/sysv/linux/splice.c b/sysdeps/unix/sysv/linux/splice.c new file mode 100644 index 0000000..2aaf878 --- /dev/null +++ b/sysdeps/unix/sysv/linux/splice.c @@ -0,0 +1,27 @@ +/* Splice data to/from a pipe Linux implementation. + Copyright (C) 2017 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 + . */ + +#include +#include + +ssize_t +splice (int fd_in, loff_t *off_in, int fd_out, loff_t *off_out, size_t len, + unsigned int flags) +{ + return SYSCALL_CANCEL (splice, fd_in, off_in, fd_out, off_out, len, flags); +} diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index 9d7bd65..b40825a 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -64,7 +64,6 @@ setfsgid EXTRA setfsgid i:i setfsgid setfsuid EXTRA setfsuid i:i setfsuid setpgid - setpgid i:ii __setpgid setpgid sigaltstack - sigaltstack i:PP __sigaltstack sigaltstack -splice EXTRA splice Ci:iPiPii splice stime - stime i:p stime sysinfo EXTRA sysinfo i:p __sysinfo sysinfo swapon - swapon i:si __swapon swapon From patchwork Fri May 12 17:58:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 99722 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp431884qge; Fri, 12 May 2017 11:00:50 -0700 (PDT) X-Received: by 10.84.238.134 with SMTP id v6mr7476529plk.137.1494612050678; Fri, 12 May 2017 11:00:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494612050; cv=none; d=google.com; s=arc-20160816; b=aSumpc/LOcoUalK85OIp31A4IwPGrWLgJ6RWT+jQ9l+W2yiM08hL/9X5Xt7+zJUSR4 Ijhy9vxUgUEnyu0wp9LljR7MOIrSV8rKYmFRdpiPE/Qx1sbmJW3DVjZ0/dDFYnz56TkR wYI6u2JJ21Lu9uvUpN9VrWIxRBGsLeyCogvlWRCpwE9RsDSFoYO25mRdh8bYZfL91ZWD pZYVYGXhOGWULgUo2OZYVJJCPRIPrtWJMBSfATPLp6gl21DeMw9wuD8VWBFYwSMMAM9I dOwvdlCC95luT4uo7K+D+jai/awRUPd8ZUii+3aYfF/xTZtoSdtyu3Cwt1Bp2SPfGwzm duJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to: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=mwLQOzuA9wxRgxXiKmmw2KHLAjSLRj9a1+3EmHjDoic=; b=pERHJlaAqOaIjEA3GI9a6IRjZ3ytRmEmawmCYEZ+C555PUJA4Mmz0dXoUA5cfq4InB kOzaM2STFEQDWfxwPrKeCfw/1cV+qFqnYQT+SZui+kA6nVxf/58H6pIVMC2PypGGpDvW +LTTfYAqXRb43kYN9HVbG7IZKy7kNu5ARioB1hS/e40DUWUxnX0DoTvLQ+YDSKOAaQss 3SnYu2g+1ZHEeGvJuGoideukI2hNoQwCeFXse2TOs6QpbAwAmP5kSId78sps0vEKNnt4 BPAV8uNbAvvdgDNjtvLHCYZ93ow3gJRe6hLRwYTNWW1EKNuC8CGSs8CbYgr3B6RASJgH pi+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-79385-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79385-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 62si3652032ple.100.2017.05.12.11.00.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2017 11:00:50 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-79385-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; spf=pass (google.com: domain of libc-alpha-return-79385-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79385-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:in-reply-to :references; q=dns; s=default; b=v2Z8Xg4NIub+YyfO0eB8IcSjDum98O+ G+HLWMN+8tdYkqt1AxagHj82qgXRox+nEsEhbwtCo/7c62zP0522HDwlOwvqDPyy cN7/k31ZFE5Rw4VxdeC12v8D41pQCPlGGQFkG4UETCxM6G0kHcKkUZy4fZpLOcMU XXFpksTrfys4= 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:in-reply-to :references; s=default; bh=/T2b0GvOSRRzWYdl+/CAPHnD61w=; b=Bdzj6 bJJjHxa8BoRQ+c1qdEw8TzqvFR0l76XTw6p0fLgeSbyb9m3BjBh3CUFa4njQ6yXp CAD/Q0JdenfWLF1mkHnBl54gn0qyVpumFJvBrrV7kPlWhyOCer5Myc/y+uBBxEsm HMXRb/o8EguomsirzSSLPBD6EREjhANlt6BinQ= Received: (qmail 45942 invoked by alias); 12 May 2017 17:58:39 -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 44654 invoked by uid 89); 12 May 2017 17:58:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL, 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=17, 8 X-HELO: mail-qk0-f177.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:in-reply-to :references; bh=mwLQOzuA9wxRgxXiKmmw2KHLAjSLRj9a1+3EmHjDoic=; b=WNSJOZHPrw04w5iDgf4RB7iHeBADsQMSsBcWIpfYQpE4TBdlXCpYEYXh8hXHa3T3Rt NDDwBRH3kXMevN0DL1lTcX/3EFQ398zLmLfNq3HBs6ChPqPCQjBAwXfPn1Gqo2UObAOE vzKsDNpQAl7mQRcfvsdiJhORIRjczbJNbQvtUAP3HyuAYFwGa5MA3hrZeGaiyyysYzrM gBt4wRQl+cxHCFNPO5cCztnndO2r+FvD2lY7xuJRq9Hsh2waKGWpWlzkHdIRZq846hZc zD1hGw78fYkTaVP7RLb6ri+at/h6Z63XDJ2xwMkTc2QCSazWyGZJIsxTdLchXtJtPAZX fWAg== X-Gm-Message-State: AODbwcDURwCq/KOlhXozl7j1eZk/FYatIme6L7nKkE7o+9zdoLk2YE+J bfx0DFRU2F/pkEww22s2wQ== X-Received: by 10.55.76.69 with SMTP id z66mr4881621qka.1.1494611914989; Fri, 12 May 2017 10:58:34 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 11/13] linux: Consolidate Linux open_by_handle_at syscall Date: Fri, 12 May 2017 14:58:12 -0300 Message-Id: <1494611894-9282-11-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> References: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> This patch consolidates the open_by_handle_at Linux syscall generation on sysdeps/unix/sysv/linux/fdatasync.c. It basically removes it from architectures auto-generation list. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu, sparc64-linux-gnu, and sparcv9-linux-gnu. * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add open_by_handle_at. (CFLAGS-open_by_handle_at.c): New flag. * sysdeps/unix/sysv/linux/open_by_handle_at.c: New file. * sysdeps/unix/sysv/linux/syscalls.list (open_by_handle_at): New file. --- ChangeLog | 7 ++++++ sysdeps/unix/sysv/linux/Makefile | 3 ++- sysdeps/unix/sysv/linux/open_by_handle_at.c | 37 +++++++++++++++++++++++++++++ sysdeps/unix/sysv/linux/syscalls.list | 1 - 4 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/open_by_handle_at.c -- 2.7.4 diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index 578f9e4..9e03a04 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -17,7 +17,8 @@ include $(firstword $(wildcard $(sysdirs:=/sysctl.mk))) sysdep_routines += clone umount umount2 readahead \ setfsuid setfsgid epoll_pwait signalfd \ eventfd eventfd_read eventfd_write prlimit \ - personality epoll_wait tee vmsplice splice + personality epoll_wait tee vmsplice splice \ + open_by_handle_at CFLAGS-gethostid.c = -fexceptions CFLAGS-tst-writev.c += "-DARTIFICIAL_LIMIT=(0x80000000-sysconf(_SC_PAGESIZE))" diff --git a/sysdeps/unix/sysv/linux/open_by_handle_at.c b/sysdeps/unix/sysv/linux/open_by_handle_at.c new file mode 100644 index 0000000..e69f041 --- /dev/null +++ b/sysdeps/unix/sysv/linux/open_by_handle_at.c @@ -0,0 +1,37 @@ +/* Obtain handle for an open file via a handle. Linux implementation. + Copyright (C) 2017 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 + . */ + +#include +#include +#include +#include + +int +open_by_handle_at (int mount_fd, struct file_handle *handle, int flags) +{ +#ifdef __NR_open_by_handle_at + return SYSCALL_CANCEL (open_by_handle_at, mount_fd, handle, flags); +#else + __set_errno (ENOSYS); + return -1; +#endif +} + +#ifndef __NR_open_by_handle_at +stub_warning (open_by_handle_at) +#endif diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index b40825a..a8d1299 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -106,7 +106,6 @@ timerfd_gettime EXTRA timerfd_gettime i:ip timerfd_gettime fanotify_init EXTRA fanotify_init i:ii fanotify_init name_to_handle_at EXTRA name_to_handle_at i:isppi name_to_handle_at -open_by_handle_at EXTRA open_by_handle_at Ci:ipi open_by_handle_at setns EXTRA setns i:ii setns From patchwork Fri May 12 17:58:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 99723 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp431990qge; Fri, 12 May 2017 11:01:01 -0700 (PDT) X-Received: by 10.99.96.3 with SMTP id u3mr5588204pgb.69.1494612061138; Fri, 12 May 2017 11:01:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494612061; cv=none; d=google.com; s=arc-20160816; b=lAmuRwM94ti4jnhH0AZ6Qmrs2Fj09qTcej/Po9eaMrJ11WkC6y7sGBhIXlYfndgnas uCHujbNRhpVzA7FY2T13q5ZPeakLnE1KJPWMFyS37phEteQHCwIGw7VFcry3fetO09Ju XpMpZNtfDejhBz+nZCQBkuOY0/R4rC+X3PT/+kWUGDhUR9MmeKuDedA7hSigOb0omGiY mRd9wdwSbH35gVGBqlOZwDyczwFNQwks5mr+SSIXGj2lrgzel1OIhNNODY+aYgO3YpQo I6EW5SLWxDFPvnFne7GM3FH1D6spNZt/dJjS8SeTeZbVfJK/U0EGYofwvOhdFKx0eRUJ cvLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to: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=BDF2UBzjQCGBGBiSbOug2/NAloNtRbkXKh/96Y0A+GA=; b=s9u7HyUuMVaiiQQuRW7tXJsOr9Pkfv0T8JQCnLq3Igseq7XfCQHH5rJ3Gb8+Qu3Ex0 FleLuFEsnkKieV6PON1oURpfWqNQsaevcW2Vevy+hCwVR1SXL9BUqv+E7DdmWTl9NFY6 c1wYjpQEq37j7PUM/mAqgAVfuXgJtj6ySBvA92xpzqCdpmNbUr52wAGC3Ii4uIPX24Kd aVIp9cw+iFwefdV+IRt4MD/a3zUcsIvmtMfZp/aUYLTNW/8yqC3xsU7c+jbUbskt/8hg QfIr3sjPPrDgNHA1ZUIktx/iXTNWQ68EGaJLPsSKyAfYvZ5jiFCYr0LT3pM+Y6pRoB28 PzOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-79386-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79386-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 i20si342310pfi.111.2017.05.12.11.01.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2017 11:01:01 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-79386-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; spf=pass (google.com: domain of libc-alpha-return-79386-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79386-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:in-reply-to :references; q=dns; s=default; b=N7bel0SBTXIRzEXmJ2EUOwl/B4Grocr EqsfQAPJEt9tIkvj06ZrdRV8Fd/QgNAX2fUnW+MSLM9N/I0p166XrbxzHfmzsE3f yYS0QMJ0MS9IS/fvw3HDiUoa296ZeF0jqfi1j3zwOLoQxmRDLF8Kqd0N9YYyt3Cm AI5Z/tHnCw2o= 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:in-reply-to :references; s=default; bh=KcbqMkKuPtvKifpKEv7M5gt655c=; b=qk4LC f0h7foItDVqqWzmfJdDQYkfxdWU8BPtn7gMiXOYBA7jHM8bXOQ/Jl3cjuhPAy7Oj s2q3F7+ptslBL50aisvvqRxBrj+ZpzEdjDNFf4j7kZ7ws1c4Fo6hqYO+TsBr1gzH IamT4bR8cvJU5P8DGmrOngYjIMU+GOPmM7QOKg= Received: (qmail 46210 invoked by alias); 12 May 2017 17:58:40 -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 45741 invoked by uid 89); 12 May 2017 17:58:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL, 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=Receive, expires X-HELO: mail-qk0-f177.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:in-reply-to :references; bh=BDF2UBzjQCGBGBiSbOug2/NAloNtRbkXKh/96Y0A+GA=; b=uC0Ows7MGvWSluQbTk8EQWUSxWWhSF1E7OQNZEh0e+4D3Iz9T7b2vEM2M9X0Lh/TBn WwU6YNYF1gCpgy3CoSH5e0PE6l1D/E1ukS1q0uXYXS4H1nRW7FiygEnKrUgPvG0kwZsG kE1QFFjAOC6l7T7S5WWK1H7JgfXPsYh8E88OT6rkg6u2pZfkt7OQuxx0DJkxX3oCGfzt tuJjlHTGxk34U6JUfZi3GgiT4ki8ovihFovj59/u4TdiI+sjM/tdudykqBr5Yoz5FpRA m531m6rrPbLi1wj/84SZq2thmEwXpWG+rbbv4Fda0/ozT1xA9gwuTUh0opUCGX4EUfDb 53+g== X-Gm-Message-State: AODbwcDX0shgQDp/AMhEhnk2/cJURXTHS+ZyIGr4Z1FiHlGKtgI6JkCj D/A6tdga3zo/uA22bF0yYw== X-Received: by 10.55.197.92 with SMTP id p89mr4647350qki.34.1494611916691; Fri, 12 May 2017 10:58:36 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 12/13] posix: Consolidate Linux mq_timedreceive syscall Date: Fri, 12 May 2017 14:58:13 -0300 Message-Id: <1494611894-9282-12-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> References: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> This patch consolidates the mq_timedreceive Linux syscall generation on sysdeps/unix/sysv/linux/mq_timedreceive.c. It basically removes it from architecture auto-generation list. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu, sparc64-linux-gnu, and sparcv9-linux-gnu. * rt/Makefile (CFLAGS-mq_timedreceive.c): New flag. * sysdeps/unix/sysv/linux/mq_timedreceive.c: New file. * sysdeps/unix/sysv/linux/syscalls.list (mq_timedreceive): Remove from auto-generation list. --- ChangeLog | 5 +++++ rt/Makefile | 1 + sysdeps/unix/sysv/linux/mq_timedreceive.c | 34 +++++++++++++++++++++++++++++++ sysdeps/unix/sysv/linux/syscalls.list | 1 - 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 sysdeps/unix/sysv/linux/mq_timedreceive.c -- 2.7.4 diff --git a/rt/Makefile b/rt/Makefile index 5283839..0ffa12d 100644 --- a/rt/Makefile +++ b/rt/Makefile @@ -61,6 +61,7 @@ extra-libs-others := $(extra-libs) include ../Rules CFLAGS-aio_suspend.c = -fexceptions +CFLAGS-mq_timedreceive.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-clock_nanosleep.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-librt-cancellation.c = -fasynchronous-unwind-tables diff --git a/sysdeps/unix/sysv/linux/mq_timedreceive.c b/sysdeps/unix/sysv/linux/mq_timedreceive.c new file mode 100644 index 0000000..6d1c145 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mq_timedreceive.c @@ -0,0 +1,34 @@ +/* Receive a message from a message queue with a timeout. Linux version. + Copyright (C) 2017 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 + . */ + +#include +#include + +/* Receive the oldest from highest priority messages in message queue + MQDES, stop waiting if ABS_TIMEOUT expires. */ +ssize_t +__mq_timedreceive (mqd_t mqdes, char *__restrict msg_ptr, size_t msg_len, + unsigned int *__restrict msg_prio, + const struct timespec *__restrict abs_timeout) +{ + return SYSCALL_CANCEL (mq_timedreceive, mqdes, msg_ptr, msg_len, msg_prio, + abs_timeout); +} +hidden_def (__mq_timedreceive) +weak_alias (__mq_timedreceive, mq_timedreceive) +hidden_weak (mq_timedreceive) diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index a8d1299..63914bc 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -96,7 +96,6 @@ lremovexattr - lremovexattr i:ss lremovexattr fremovexattr - fremovexattr i:is fremovexattr mq_timedsend - mq_timedsend Ci:ipiip __mq_timedsend mq_timedsend -mq_timedreceive - mq_timedreceive Ci:ipipp __mq_timedreceive mq_timedreceive mq_setattr - mq_getsetattr i:ipp mq_setattr timerfd_create EXTRA timerfd_create i:ii timerfd_create From patchwork Fri May 12 17:58:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 99724 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp432121qge; Fri, 12 May 2017 11:01:15 -0700 (PDT) X-Received: by 10.98.75.6 with SMTP id y6mr5904096pfa.157.1494612075508; Fri, 12 May 2017 11:01:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494612075; cv=none; d=google.com; s=arc-20160816; b=eTSU97PfdZc2dmIYsmd3+NAFKOR/Au8wkdBw367fcBRaD+r6ApZWp/lM4EvR/k0iqW Qgru/0ZwhNyjNcX5npEt6argZGl9FQk220hrd431Jhl1hiGxPNTjg1pkElCXEBaHPLs3 yRtyLKPNl58HMkOmv/X9hEbVq7/PgAyN8z0h75L8HZPwZDDXsdR90li8QcXs55RwyqA8 MMpzywreEFPgzxtUxApZ+Uju9PtxPObavE7PNAcqHRpbG+sQCDgnycqbo6s8Z6hda3GW T+hIeOYROfI3sXy2chnA8nKEVkEurKLwvcgO4SIdsEOJSjbMpeK90pkBce3watN0+hnf f4+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to: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=tRAIUduAToa9f+hSBJ2tfwMIjuDGt90LsyEQ9kH7CpQ=; b=LRoo2Qaz91dlK6ElNEKfR45KHiOHwpjZQpcZUPTtvXV3E1EwzjgRYRBHJH7p85INcq qxvYulKBjEC5w/BF6GgeDHgqi4xlVbmcWWrFoGp3lbjE1B2Y9lCJI2znZ0WQPAMf/qqP c1QyS6jy9ah/XVMEDu9ClDB30FrnquYKP4X7bxzHc/i067AYox+0rPFWnEOz/WskKIU6 UjER/jxRIdUehEdSgsdYbR3LrhQQWJMb04V3vVx1H9GZvrx+TAbIv561fQsNC8Cbi55L G3wZE80XxJ7TcnPJQVJ+Hj4eP198JREcObQMgHsjwhB2orpDaDMOvsL0X2LF1tPI6N+l Hm4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-79387-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79387-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 o9si4038287pge.355.2017.05.12.11.01.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2017 11:01:15 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-79387-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; spf=pass (google.com: domain of libc-alpha-return-79387-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-79387-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:in-reply-to :references; q=dns; s=default; b=Zv66bmHFX+ESmMEo6UpcJ2XhUK5q0cW RtjW2vPCca+xEJyC6OSiewjzzKa4Py1/xJAvnZrBMdiqIK8t2RQ5cP16v8mikHNm HKJJ/rjxrIiPeUpqpnbnHGWrER0Exxt9RqTK0u5mQPBxV6P7wTa8Fxvh8uqs0dIw sJs0FwwxPr0I= 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:in-reply-to :references; s=default; bh=qgG3qZjb94HFPVN2ZrRJo83wjyg=; b=TL/O3 4SrEmWLxwnhrvAPaR6590Bv90qga31fw3r+GK7IPsg2oYt4Ghsy2lEtUKUt69xEQ nCvxkPRstBAAN7AfXzgcJmpcE36B9SkrS+1Q0Y0gV75aHsoJRayRFSYT8buf+4GL bCYOblTNlFBhtadBDzW2hA9sL2668mmXcSLdRs= Received: (qmail 46458 invoked by alias); 12 May 2017 17:58:40 -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 45843 invoked by uid 89); 12 May 2017 17:58:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL, 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=expires X-HELO: mail-qk0-f181.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:in-reply-to :references; bh=tRAIUduAToa9f+hSBJ2tfwMIjuDGt90LsyEQ9kH7CpQ=; b=l6GfbdViaeyKYTOZ3lg/CPo1js0KhLjAOVHvF+EV3DtrGv5Ol5EU+2K2Oe1MDCQQ61 RdePGEgLHNwJuuVFyRxuji+/TUZWLJK4jU1QuhiQ5wBOc/PGjuGZWy/eGfWsFnqApug4 COgfbyVDCsjS2Ak5YxYHywaWrHTgV44K8juMdSSxyRLDzMoLWmYBFCo1g9X+juRKcKSG Wn/Bunpqn9AxQUyiB7ZGFlZVNa21tSeHWhW9kPf+2xaVPoez8gGLODzv0laU8OV5L/Yj OOm4cvJDmbCdxKSeNd++FI0EcTHa8XibVfhxhz3GrxLlHXWlAALXhAtijkdCKWR95ESf ZovQ== X-Gm-Message-State: AODbwcDCezXgK2yhOeS/mvKocv+sqtQXumHvOYzZHCCM35+rJeFzpmH6 udtc+M4NK1rAk+2bm58m0A== X-Received: by 10.55.128.1 with SMTP id b1mr4841915qkd.226.1494611918116; Fri, 12 May 2017 10:58:38 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 13/13] posix: Consolidate Linux mq_timedsend syscall Date: Fri, 12 May 2017 14:58:14 -0300 Message-Id: <1494611894-9282-13-git-send-email-adhemerval.zanella@linaro.org> In-Reply-To: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> References: <1494611894-9282-1-git-send-email-adhemerval.zanella@linaro.org> This patch consolidates the mq_timedsend Linux syscall generation on sysdeps/unix/sysv/linux/mq_timedsend.c. It basically removes it from architecture auto-generation list. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu, sparc64-linux-gnu, and sparcv9-linux-gnu. * rt/Makefile (CFLAGS-mq_timedsend.c): New flag. * sysdeps/unix/sysv/linux/mq_timedsend.c: New file. * sysdeps/unix/sysv/linux/syscalls.list (mq_timedsend): Remove from auto-generation list. --- ChangeLog | 5 +++++ rt/Makefile | 1 + sysdeps/unix/sysv/linux/mq_timedsend.c | 33 +++++++++++++++++++++++++++++++++ sysdeps/unix/sysv/linux/syscalls.list | 1 - 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 sysdeps/unix/sysv/linux/mq_timedsend.c -- 2.7.4 diff --git a/rt/Makefile b/rt/Makefile index 0ffa12d..9740dc2 100644 --- a/rt/Makefile +++ b/rt/Makefile @@ -62,6 +62,7 @@ include ../Rules CFLAGS-aio_suspend.c = -fexceptions CFLAGS-mq_timedreceive.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-mq_timedsend.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-clock_nanosleep.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-librt-cancellation.c = -fasynchronous-unwind-tables diff --git a/sysdeps/unix/sysv/linux/mq_timedsend.c b/sysdeps/unix/sysv/linux/mq_timedsend.c new file mode 100644 index 0000000..7995554 --- /dev/null +++ b/sysdeps/unix/sysv/linux/mq_timedsend.c @@ -0,0 +1,33 @@ +/* Send a message to a message queue with a timeout. Linux version. + Copyright (C) 2017 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 + . */ + +#include +#include + +/* Add message pointed by MSG_PTR to message queue MQDES, stop blocking + on full message queue if ABS_TIMEOUT expires. */ +int +__mq_timedsend (mqd_t mqdes, const char *msg_ptr, size_t msg_len, + unsigned int msg_prio, const struct timespec *abs_timeout) +{ + return SYSCALL_CANCEL (mq_timedsend, mqdes, msg_ptr, msg_len, msg_prio, + abs_timeout); +} +hidden_def (__mq_timedsend) +weak_alias (__mq_timedsend, mq_timedsend) +hidden_weak (mq_timedsend) diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index 63914bc..8bfb080 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -95,7 +95,6 @@ removexattr - removexattr i:ss removexattr lremovexattr - lremovexattr i:ss lremovexattr fremovexattr - fremovexattr i:is fremovexattr -mq_timedsend - mq_timedsend Ci:ipiip __mq_timedsend mq_timedsend mq_setattr - mq_getsetattr i:ipp mq_setattr timerfd_create EXTRA timerfd_create i:ii timerfd_create