From patchwork Wed Nov 6 12:52:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 178679 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp564632ilf; Wed, 6 Nov 2019 04:53:08 -0800 (PST) X-Google-Smtp-Source: APXvYqxiWsnYrj/3jpXoc6BatjPV7klttW6dZOfkiFR22GFsSKAa9PwbiIEaWS5fHgGw927/g3XQ X-Received: by 2002:a17:906:b856:: with SMTP id ga22mr28886821ejb.231.1573044788856; Wed, 06 Nov 2019 04:53:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573044788; cv=none; d=google.com; s=arc-20160816; b=GPg7KUnLbx3bXPfbfzn2ZmEsejUDE4gHfR4+1zgC6TiiZrLyBg7MiA31+DtTHRnEkU uRk40za9KjdpjSnciHv8Kmd02HDV2VckpWxT2YavAS6QPJzMe0JrL2rLsqiet8YD/aog Z/RkeY5tp3e8x0UNNJqGEZF2s4PsRlTVwZLQiYqtJQ0H2IpuQSB4rvj5SaAf00tiph3g oFBycpfyaGmDn0RJQVj115v0sPCffQbhr/+8lK8RjXWgbZJCPPlCzyitgJ+2hfV8xMyG DyIBo/TpFGvm+cTAnYb5kvbzue84x8DoW3kjYELa2p0l6/0molKbtHjiidijwQOc8tJE duOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:to:from:dkim-signature:delivered-to:sender :list-help:list-post:list-archive:list-subscribe:list-unsubscribe :list-id:precedence:mailing-list:dkim-signature:domainkey-signature; bh=HD8fwrOv3gzkgYvmJ7ePNPDyacsb9lytJcp6VrEelJ4=; b=heJ2/K/1rvpOPeAhlp05ocKaddBgjbfKwg6McWD9oaBQAxt47SHV7Bfkxvrlhe161u bXZRbU5n6TwvH1PZVrfhp5w+CkX9TTchwM9pm1s+3jcZpHfC1x/nnGHutRazRqGC+CFd LUdbUgPZhExipf2avquVxlA1Nd9F5qgE06qGjAPgP4h+stLFu6VsEZl1JU3XqaNX2YIs E4wWG6TtHYaM9dphmtMtpgyWuauE69BRCT5bA/HlrP1HsEQx8CnBp8uW/PsF7f2tALiR Ba3XP3O05tI2jD1qhUqS6XG8IbTKMIS4Qa7J+4XLbzuhJJpefwgTGYkMRekvb4F7y1Ce 6T4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=SVF4MyMT; dkim=pass header.i=@linaro.org header.s=google header.b="L9t/DRYx"; spf=pass (google.com: domain of libc-alpha-return-106682-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-106682-patch=linaro.org@sourceware.org"; dmarc=pass (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 br3si7298233ejb.436.2019.11.06.04.53.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Nov 2019 04:53:08 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-106682-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=SVF4MyMT; dkim=pass header.i=@linaro.org header.s=google header.b="L9t/DRYx"; spf=pass (google.com: domain of libc-alpha-return-106682-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-106682-patch=linaro.org@sourceware.org"; dmarc=pass (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=Qs/UyTYOGZwgSD6ZQNmAkx0RrxDd2XYHHzbHdjNbPwqwrWcmh0Av/ dGpDmksDiKoaQGCKlnzyj5SDZU+N2TbL2UF1IT8cmId39KIs0469MhFGdxrM8Pw8 zdkxzqdmpzSo8El04+cebDW+6HTmXhFo9iyS2zWI1j8mcC/yB4DsM8= 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=wWBOXHs2wQYxfoT8losVlLUScYU=; b=SVF4MyMTkhZYU7za6SiUVuIx+EJg 1SiTsFcf35kocqhWZajADEaYJ+47blhRFru5YGYPkU1bGFxCZA+c5JY3W+HTRai1 ch+Tz7CQlV7I+5u0dObzBDT46Nj1vShm99v/jWMYVqxmVof6ty2n1taoemDWzigz c9xN3mcHZMbGFPI= Received: (qmail 56718 invoked by alias); 6 Nov 2019 12:52:57 -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 56701 invoked by uid 89); 6 Nov 2019 12:52:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=smoke, 1946, 1937 X-HELO: mail-qt1-f175.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id; bh=HD8fwrOv3gzkgYvmJ7ePNPDyacsb9lytJcp6VrEelJ4=; b=L9t/DRYxF8CTGA6VPqcem+5vmKTpUFQdfgZhW8xGVrl9Q6VDtVdVnQk2eI3OTVxUL/ KNQ7o8VLS9t3x2WVBEX1WH8gzbyY+LxPgtMwohMo+6iCKR4psc/aMuF53XPocEIBWyWZ CU+ywsYNUzrjzDz2q3OnoolITtdQUcR+nq4U+LoZhbmmVcr8iJolirfnXKOdwYZq3tsM hUK1P5N+pFWeOL4vWcWaUFIEDlAzhYBLLb7M2F6W6JEXDogPzWK893f/E56TsvXuGDHF ZDjUV9TPu6ROr/jCueIr9cJ0DrYShBJ1Ic1gKLHd+zPUVUXOfMcDiquTs3g7GWm4NBug eNRA== Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 1/3] nptl: Move nanosleep implementation to libc Date: Wed, 6 Nov 2019 09:52:43 -0300 Message-Id: <20191106125245.28102-1-adhemerval.zanella@linaro.org> Checked on x86_64-linux-gnu and powerpc64le-linux-gnu. I also did a smoke check with check-abi on affected ABIs. --- nptl/Makefile | 3 +-- nptl/Versions | 7 +------ sysdeps/unix/sysv/linux/aarch64/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/alpha/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/arm/be/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/arm/le/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/csky/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/hppa/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/i386/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/ia64/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/nios2/libpthread.abilist | 2 -- .../unix/sysv/linux/powerpc/powerpc32/libpthread.abilist | 2 -- .../sysv/linux/powerpc/powerpc64/be/libpthread.abilist | 2 -- .../sysv/linux/powerpc/powerpc64/le/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/sh/be/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/sh/le/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist | 2 -- time/Makefile | 1 + 30 files changed, 3 insertions(+), 62 deletions(-) -- 2.17.1 diff --git a/nptl/Makefile b/nptl/Makefile index 73b20718ed..f9aadfd644 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -44,7 +44,7 @@ pthread-compat-wrappers = \ write read close accept \ connect recv recvfrom send \ sendto fsync lseek lseek64 \ - msync nanosleep open open64 pause \ + msync open open64 pause \ pread pread64 pwrite pwrite64 \ tcdrain wait waitpid msgrcv msgsnd \ sigwait sigsuspend \ @@ -225,7 +225,6 @@ 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-sigsuspend.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-msync.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-fdatasync.c += -fexceptions -fasynchronous-unwind-tables diff --git a/nptl/Versions b/nptl/Versions index adbd4fa589..92291bf49e 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -98,7 +98,7 @@ libpthread { # Cancellation points. close; __close; fcntl; __fcntl; read; __read; write; __write; accept; connect; __connect; recv; recvfrom; recvmsg; send; __send; sendmsg; sendto; - fsync; lseek; __lseek; msync; nanosleep; open; __open; pause; tcdrain; + fsync; lseek; __lseek; msync; open; __open; pause; tcdrain; system; wait; __wait; waitpid; # Hidden entry point (through macros). @@ -192,11 +192,6 @@ libpthread { pthread_getattr_np; } - GLIBC_2.2.6 { - # Cancellation wrapper - __nanosleep; - } - GLIBC_2.3.2 { # Changed pthread_cond_t. pthread_cond_init; pthread_cond_destroy; diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist index e6e6489b02..98a8473fcd 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist @@ -11,7 +11,6 @@ GLIBC_2.17 __libc_allocate_rtsig F GLIBC_2.17 __libc_current_sigrtmax F GLIBC_2.17 __libc_current_sigrtmin F GLIBC_2.17 __lseek F -GLIBC_2.17 __nanosleep F GLIBC_2.17 __open F GLIBC_2.17 __open64 F GLIBC_2.17 __pread64 F @@ -64,7 +63,6 @@ GLIBC_2.17 longjmp F GLIBC_2.17 lseek F GLIBC_2.17 lseek64 F GLIBC_2.17 msync F -GLIBC_2.17 nanosleep F GLIBC_2.17 open F GLIBC_2.17 open64 F GLIBC_2.17 pause F diff --git a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist index 89e129aa1e..f42bcffd1e 100644 --- a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist @@ -42,7 +42,6 @@ GLIBC_2.0 funlockfile F GLIBC_2.0 longjmp F GLIBC_2.0 lseek F GLIBC_2.0 msync F -GLIBC_2.0 nanosleep F GLIBC_2.0 open F GLIBC_2.0 pause F GLIBC_2.0 pthread_atfork F @@ -193,7 +192,6 @@ GLIBC_2.2 pwrite F GLIBC_2.2 pwrite64 F GLIBC_2.2 sem_timedwait F GLIBC_2.2.3 pthread_getattr_np F -GLIBC_2.2.6 __nanosleep F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F GLIBC_2.28 cnd_destroy F diff --git a/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist index 1961bd0da0..c5b7aeb7c4 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist @@ -46,7 +46,6 @@ GLIBC_2.4 __libc_allocate_rtsig F GLIBC_2.4 __libc_current_sigrtmax F GLIBC_2.4 __libc_current_sigrtmin F GLIBC_2.4 __lseek F -GLIBC_2.4 __nanosleep F GLIBC_2.4 __open F GLIBC_2.4 __open64 F GLIBC_2.4 __pread64 F @@ -99,7 +98,6 @@ GLIBC_2.4 longjmp F GLIBC_2.4 lseek F GLIBC_2.4 lseek64 F GLIBC_2.4 msync F -GLIBC_2.4 nanosleep F GLIBC_2.4 open F GLIBC_2.4 open64 F GLIBC_2.4 pause F diff --git a/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist index 1961bd0da0..c5b7aeb7c4 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist @@ -46,7 +46,6 @@ GLIBC_2.4 __libc_allocate_rtsig F GLIBC_2.4 __libc_current_sigrtmax F GLIBC_2.4 __libc_current_sigrtmin F GLIBC_2.4 __lseek F -GLIBC_2.4 __nanosleep F GLIBC_2.4 __open F GLIBC_2.4 __open64 F GLIBC_2.4 __pread64 F @@ -99,7 +98,6 @@ GLIBC_2.4 longjmp F GLIBC_2.4 lseek F GLIBC_2.4 lseek64 F GLIBC_2.4 msync F -GLIBC_2.4 nanosleep F GLIBC_2.4 open F GLIBC_2.4 open64 F GLIBC_2.4 pause F diff --git a/sysdeps/unix/sysv/linux/csky/libpthread.abilist b/sysdeps/unix/sysv/linux/csky/libpthread.abilist index 259f6a8ff3..edbdea39cf 100644 --- a/sysdeps/unix/sysv/linux/csky/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/csky/libpthread.abilist @@ -9,7 +9,6 @@ GLIBC_2.29 __libc_allocate_rtsig F GLIBC_2.29 __libc_current_sigrtmax F GLIBC_2.29 __libc_current_sigrtmin F GLIBC_2.29 __lseek F -GLIBC_2.29 __nanosleep F GLIBC_2.29 __open F GLIBC_2.29 __open64 F GLIBC_2.29 __pread64 F @@ -72,7 +71,6 @@ GLIBC_2.29 mtx_lock F GLIBC_2.29 mtx_timedlock F GLIBC_2.29 mtx_trylock F GLIBC_2.29 mtx_unlock F -GLIBC_2.29 nanosleep F GLIBC_2.29 open F GLIBC_2.29 open64 F GLIBC_2.29 pause F diff --git a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist index c03a4a6731..a8ddccac98 100644 --- a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist @@ -65,7 +65,6 @@ GLIBC_2.2 longjmp F GLIBC_2.2 lseek F GLIBC_2.2 lseek64 F GLIBC_2.2 msync F -GLIBC_2.2 nanosleep F GLIBC_2.2 open F GLIBC_2.2 open64 F GLIBC_2.2 pause F @@ -185,7 +184,6 @@ GLIBC_2.2 wait F GLIBC_2.2 waitpid F GLIBC_2.2 write F GLIBC_2.2.3 pthread_getattr_np F -GLIBC_2.2.6 __nanosleep F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F GLIBC_2.28 cnd_destroy F diff --git a/sysdeps/unix/sysv/linux/i386/libpthread.abilist b/sysdeps/unix/sysv/linux/i386/libpthread.abilist index 831cdecca4..5d1bf0f5ab 100644 --- a/sysdeps/unix/sysv/linux/i386/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/i386/libpthread.abilist @@ -42,7 +42,6 @@ GLIBC_2.0 funlockfile F GLIBC_2.0 longjmp F GLIBC_2.0 lseek F GLIBC_2.0 msync F -GLIBC_2.0 nanosleep F GLIBC_2.0 open F GLIBC_2.0 pause F GLIBC_2.0 pthread_atfork F @@ -193,7 +192,6 @@ GLIBC_2.2 pwrite F GLIBC_2.2 pwrite64 F GLIBC_2.2 sem_timedwait F GLIBC_2.2.3 pthread_getattr_np F -GLIBC_2.2.6 __nanosleep F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F GLIBC_2.28 cnd_destroy F diff --git a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist index 7609d56186..db3da66c35 100644 --- a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist @@ -65,7 +65,6 @@ GLIBC_2.2 longjmp F GLIBC_2.2 lseek F GLIBC_2.2 lseek64 F GLIBC_2.2 msync F -GLIBC_2.2 nanosleep F GLIBC_2.2 open F GLIBC_2.2 open64 F GLIBC_2.2 pause F @@ -185,7 +184,6 @@ GLIBC_2.2 wait F GLIBC_2.2 waitpid F GLIBC_2.2 write F GLIBC_2.2.3 pthread_getattr_np F -GLIBC_2.2.6 __nanosleep F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F GLIBC_2.28 cnd_destroy F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist index 1961bd0da0..c5b7aeb7c4 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist @@ -46,7 +46,6 @@ GLIBC_2.4 __libc_allocate_rtsig F GLIBC_2.4 __libc_current_sigrtmax F GLIBC_2.4 __libc_current_sigrtmin F GLIBC_2.4 __lseek F -GLIBC_2.4 __nanosleep F GLIBC_2.4 __open F GLIBC_2.4 __open64 F GLIBC_2.4 __pread64 F @@ -99,7 +98,6 @@ GLIBC_2.4 longjmp F GLIBC_2.4 lseek F GLIBC_2.4 lseek64 F GLIBC_2.4 msync F -GLIBC_2.4 nanosleep F GLIBC_2.4 open F GLIBC_2.4 open64 F GLIBC_2.4 pause F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist index 831cdecca4..5d1bf0f5ab 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist @@ -42,7 +42,6 @@ GLIBC_2.0 funlockfile F GLIBC_2.0 longjmp F GLIBC_2.0 lseek F GLIBC_2.0 msync F -GLIBC_2.0 nanosleep F GLIBC_2.0 open F GLIBC_2.0 pause F GLIBC_2.0 pthread_atfork F @@ -193,7 +192,6 @@ GLIBC_2.2 pwrite F GLIBC_2.2 pwrite64 F GLIBC_2.2 sem_timedwait F GLIBC_2.2.3 pthread_getattr_np F -GLIBC_2.2.6 __nanosleep F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F GLIBC_2.28 cnd_destroy F diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist index 269cd0994f..bf777df285 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist @@ -11,7 +11,6 @@ GLIBC_2.18 __libc_allocate_rtsig F GLIBC_2.18 __libc_current_sigrtmax F GLIBC_2.18 __libc_current_sigrtmin F GLIBC_2.18 __lseek F -GLIBC_2.18 __nanosleep F GLIBC_2.18 __open F GLIBC_2.18 __open64 F GLIBC_2.18 __pread64 F @@ -64,7 +63,6 @@ GLIBC_2.18 longjmp F GLIBC_2.18 lseek F GLIBC_2.18 lseek64 F GLIBC_2.18 msync F -GLIBC_2.18 nanosleep F GLIBC_2.18 open F GLIBC_2.18 open64 F GLIBC_2.18 pause F diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist index 269cd0994f..bf777df285 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist @@ -11,7 +11,6 @@ GLIBC_2.18 __libc_allocate_rtsig F GLIBC_2.18 __libc_current_sigrtmax F GLIBC_2.18 __libc_current_sigrtmin F GLIBC_2.18 __lseek F -GLIBC_2.18 __nanosleep F GLIBC_2.18 __open F GLIBC_2.18 __open64 F GLIBC_2.18 __pread64 F @@ -64,7 +63,6 @@ GLIBC_2.18 longjmp F GLIBC_2.18 lseek F GLIBC_2.18 lseek64 F GLIBC_2.18 msync F -GLIBC_2.18 nanosleep F GLIBC_2.18 open F GLIBC_2.18 open64 F GLIBC_2.18 pause F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist index d3288b4ab3..6229568a0c 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist @@ -42,7 +42,6 @@ GLIBC_2.0 funlockfile F GLIBC_2.0 longjmp F GLIBC_2.0 lseek F GLIBC_2.0 msync F -GLIBC_2.0 nanosleep F GLIBC_2.0 open F GLIBC_2.0 pause F GLIBC_2.0 pthread_atfork F @@ -192,7 +191,6 @@ GLIBC_2.2 sem_trywait F GLIBC_2.2 sem_unlink F GLIBC_2.2 sem_wait F GLIBC_2.2.3 pthread_getattr_np F -GLIBC_2.2.6 __nanosleep F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F GLIBC_2.28 cnd_destroy F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist index d3288b4ab3..6229568a0c 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist @@ -42,7 +42,6 @@ GLIBC_2.0 funlockfile F GLIBC_2.0 longjmp F GLIBC_2.0 lseek F GLIBC_2.0 msync F -GLIBC_2.0 nanosleep F GLIBC_2.0 open F GLIBC_2.0 pause F GLIBC_2.0 pthread_atfork F @@ -192,7 +191,6 @@ GLIBC_2.2 sem_trywait F GLIBC_2.2 sem_unlink F GLIBC_2.2 sem_wait F GLIBC_2.2.3 pthread_getattr_np F -GLIBC_2.2.6 __nanosleep F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F GLIBC_2.28 cnd_destroy F diff --git a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist index 961cd4a60c..03a462ef91 100644 --- a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist @@ -11,7 +11,6 @@ GLIBC_2.21 __libc_allocate_rtsig F GLIBC_2.21 __libc_current_sigrtmax F GLIBC_2.21 __libc_current_sigrtmin F GLIBC_2.21 __lseek F -GLIBC_2.21 __nanosleep F GLIBC_2.21 __open F GLIBC_2.21 __open64 F GLIBC_2.21 __pread64 F @@ -64,7 +63,6 @@ GLIBC_2.21 longjmp F GLIBC_2.21 lseek F GLIBC_2.21 lseek64 F GLIBC_2.21 msync F -GLIBC_2.21 nanosleep F GLIBC_2.21 open F GLIBC_2.21 open64 F GLIBC_2.21 pause F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist index 66845c2e1e..0245103a0b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist @@ -42,7 +42,6 @@ GLIBC_2.0 funlockfile F GLIBC_2.0 longjmp F GLIBC_2.0 lseek F GLIBC_2.0 msync F -GLIBC_2.0 nanosleep F GLIBC_2.0 open F GLIBC_2.0 pause F GLIBC_2.0 pthread_atfork F @@ -193,7 +192,6 @@ GLIBC_2.2 pwrite F GLIBC_2.2 pwrite64 F GLIBC_2.2 sem_timedwait F GLIBC_2.2.3 pthread_getattr_np F -GLIBC_2.2.6 __nanosleep F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F GLIBC_2.28 cnd_destroy F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist index 143ed2dc7b..618004a931 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist @@ -40,7 +40,6 @@ GLIBC_2.3 __libc_allocate_rtsig F GLIBC_2.3 __libc_current_sigrtmax F GLIBC_2.3 __libc_current_sigrtmin F GLIBC_2.3 __lseek F -GLIBC_2.3 __nanosleep F GLIBC_2.3 __open F GLIBC_2.3 __open64 F GLIBC_2.3 __pread64 F @@ -87,7 +86,6 @@ GLIBC_2.3 longjmp F GLIBC_2.3 lseek F GLIBC_2.3 lseek64 F GLIBC_2.3 msync F -GLIBC_2.3 nanosleep F GLIBC_2.3 open F GLIBC_2.3 open64 F GLIBC_2.3 pause F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist index e6e6489b02..98a8473fcd 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist @@ -11,7 +11,6 @@ GLIBC_2.17 __libc_allocate_rtsig F GLIBC_2.17 __libc_current_sigrtmax F GLIBC_2.17 __libc_current_sigrtmin F GLIBC_2.17 __lseek F -GLIBC_2.17 __nanosleep F GLIBC_2.17 __open F GLIBC_2.17 __open64 F GLIBC_2.17 __pread64 F @@ -64,7 +63,6 @@ GLIBC_2.17 longjmp F GLIBC_2.17 lseek F GLIBC_2.17 lseek64 F GLIBC_2.17 msync F -GLIBC_2.17 nanosleep F GLIBC_2.17 open F GLIBC_2.17 open64 F GLIBC_2.17 pause F diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist index b52721ca6f..d44217ac85 100644 --- a/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist @@ -10,7 +10,6 @@ GLIBC_2.27 __libc_allocate_rtsig F GLIBC_2.27 __libc_current_sigrtmax F GLIBC_2.27 __libc_current_sigrtmin F GLIBC_2.27 __lseek F -GLIBC_2.27 __nanosleep F GLIBC_2.27 __open F GLIBC_2.27 __open64 F GLIBC_2.27 __pread64 F @@ -61,7 +60,6 @@ GLIBC_2.27 funlockfile F GLIBC_2.27 lseek F GLIBC_2.27 lseek64 F GLIBC_2.27 msync F -GLIBC_2.27 nanosleep F GLIBC_2.27 open F GLIBC_2.27 open64 F GLIBC_2.27 pause F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist index caf7f79355..429d8b6224 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist @@ -42,7 +42,6 @@ GLIBC_2.0 funlockfile F GLIBC_2.0 longjmp F GLIBC_2.0 lseek F GLIBC_2.0 msync F -GLIBC_2.0 nanosleep F GLIBC_2.0 open F GLIBC_2.0 pause F GLIBC_2.0 pthread_atfork F @@ -195,7 +194,6 @@ GLIBC_2.2 pwrite F GLIBC_2.2 pwrite64 F GLIBC_2.2 sem_timedwait F GLIBC_2.2.3 pthread_getattr_np F -GLIBC_2.2.6 __nanosleep F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F GLIBC_2.28 cnd_destroy F diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist index 9e12e9b3a9..4a9bffeaa0 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist @@ -67,7 +67,6 @@ GLIBC_2.2 longjmp F GLIBC_2.2 lseek F GLIBC_2.2 lseek64 F GLIBC_2.2 msync F -GLIBC_2.2 nanosleep F GLIBC_2.2 open F GLIBC_2.2 open64 F GLIBC_2.2 pause F @@ -187,7 +186,6 @@ GLIBC_2.2 wait F GLIBC_2.2 waitpid F GLIBC_2.2 write F GLIBC_2.2.3 pthread_getattr_np F -GLIBC_2.2.6 __nanosleep F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F GLIBC_2.28 cnd_destroy F diff --git a/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist b/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist index c03a4a6731..a8ddccac98 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist @@ -65,7 +65,6 @@ GLIBC_2.2 longjmp F GLIBC_2.2 lseek F GLIBC_2.2 lseek64 F GLIBC_2.2 msync F -GLIBC_2.2 nanosleep F GLIBC_2.2 open F GLIBC_2.2 open64 F GLIBC_2.2 pause F @@ -185,7 +184,6 @@ GLIBC_2.2 wait F GLIBC_2.2 waitpid F GLIBC_2.2 write F GLIBC_2.2.3 pthread_getattr_np F -GLIBC_2.2.6 __nanosleep F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F GLIBC_2.28 cnd_destroy F diff --git a/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist b/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist index c03a4a6731..a8ddccac98 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist @@ -65,7 +65,6 @@ GLIBC_2.2 longjmp F GLIBC_2.2 lseek F GLIBC_2.2 lseek64 F GLIBC_2.2 msync F -GLIBC_2.2 nanosleep F GLIBC_2.2 open F GLIBC_2.2 open64 F GLIBC_2.2 pause F @@ -185,7 +184,6 @@ GLIBC_2.2 wait F GLIBC_2.2 waitpid F GLIBC_2.2 write F GLIBC_2.2.3 pthread_getattr_np F -GLIBC_2.2.6 __nanosleep F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F GLIBC_2.28 cnd_destroy F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist index 89e129aa1e..f42bcffd1e 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist @@ -42,7 +42,6 @@ GLIBC_2.0 funlockfile F GLIBC_2.0 longjmp F GLIBC_2.0 lseek F GLIBC_2.0 msync F -GLIBC_2.0 nanosleep F GLIBC_2.0 open F GLIBC_2.0 pause F GLIBC_2.0 pthread_atfork F @@ -193,7 +192,6 @@ GLIBC_2.2 pwrite F GLIBC_2.2 pwrite64 F GLIBC_2.2 sem_timedwait F GLIBC_2.2.3 pthread_getattr_np F -GLIBC_2.2.6 __nanosleep F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F GLIBC_2.28 cnd_destroy F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist index 7609d56186..db3da66c35 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist @@ -65,7 +65,6 @@ GLIBC_2.2 longjmp F GLIBC_2.2 lseek F GLIBC_2.2 lseek64 F GLIBC_2.2 msync F -GLIBC_2.2 nanosleep F GLIBC_2.2 open F GLIBC_2.2 open64 F GLIBC_2.2 pause F @@ -185,7 +184,6 @@ GLIBC_2.2 wait F GLIBC_2.2 waitpid F GLIBC_2.2 write F GLIBC_2.2.3 pthread_getattr_np F -GLIBC_2.2.6 __nanosleep F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F GLIBC_2.28 cnd_destroy F diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist index 39f807bb5f..e13f81e21c 100644 --- a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist @@ -65,7 +65,6 @@ GLIBC_2.2.5 longjmp F GLIBC_2.2.5 lseek F GLIBC_2.2.5 lseek64 F GLIBC_2.2.5 msync F -GLIBC_2.2.5 nanosleep F GLIBC_2.2.5 open F GLIBC_2.2.5 open64 F GLIBC_2.2.5 pause F @@ -185,7 +184,6 @@ GLIBC_2.2.5 tcdrain F GLIBC_2.2.5 wait F GLIBC_2.2.5 waitpid F GLIBC_2.2.5 write F -GLIBC_2.2.6 __nanosleep F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F GLIBC_2.28 cnd_destroy F diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist index 21191a7aa0..aadd9eb0fa 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist @@ -11,7 +11,6 @@ GLIBC_2.16 __libc_allocate_rtsig F GLIBC_2.16 __libc_current_sigrtmax F GLIBC_2.16 __libc_current_sigrtmin F GLIBC_2.16 __lseek F -GLIBC_2.16 __nanosleep F GLIBC_2.16 __open F GLIBC_2.16 __open64 F GLIBC_2.16 __pread64 F @@ -64,7 +63,6 @@ GLIBC_2.16 longjmp F GLIBC_2.16 lseek F GLIBC_2.16 lseek64 F GLIBC_2.16 msync F -GLIBC_2.16 nanosleep F GLIBC_2.16 open F GLIBC_2.16 open64 F GLIBC_2.16 pause F diff --git a/time/Makefile b/time/Makefile index 6de4e418d9..23630ae3fe 100644 --- a/time/Makefile +++ b/time/Makefile @@ -73,6 +73,7 @@ CFLAGS-tzfile.c += $(tz-cflags) CFLAGS-tzset.c += $(tz-cflags) CFLAGS-getdate.c += -fexceptions CFLAGS-clock_nanosleep.c += -fexceptions -fasynchronous-unwind-tables +CFLAGS-nanosleep.c += -fexceptions -fasynchronous-unwind-tables # Don't warn about Y2k problem in strftime format string. CFLAGS-test_time.c += -Wno-format From patchwork Wed Nov 6 12:52:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 178681 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp564885ilf; Wed, 6 Nov 2019 04:53:26 -0800 (PST) X-Google-Smtp-Source: APXvYqwYPZ0hLxMuFLW4RsV/GW/NP60MK5Vc8R2fZ2RtpUgEyEWJoIQB8yQ5slXiMdL2qGr7X+yk X-Received: by 2002:a17:906:240c:: with SMTP id z12mr1300492eja.35.1573044806732; Wed, 06 Nov 2019 04:53:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573044806; cv=none; d=google.com; s=arc-20160816; b=DhsAV7ilgkZUw79fuI9bXHE9+k4WQdAfFnSS6oCqc+ZdLvBq/QMvUvLF+hLJFHmGXn SCYWa7BE3Ze4Qfk/B2tWkmns111rJKsz9n5kud+8IWESssrvK+7a831cTV0OOFJ3UA1L 8ANVfv/o70kkHmE6vm/vJV8Yw2vyfQnxOoN7mK2cQcPrN6QrFTneJlTuaG3Q1k1o3NSV Y1TMWtk8HD+U3sCAHxINDzR1XEsSkFzImaWszjhcdWiOSMw8zB3QbiMy38yEii9Uggmp 84TMYsm5C0Mg46s0uThozi+GCLQN4zocYb6jV3VjnYZplc5+AOJqUSEEFL3Wk4vmVUUt A7IQ== 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 :dkim-signature:delivered-to:sender:list-help:list-post:list-archive :list-subscribe:list-unsubscribe:list-id:precedence:mailing-list :dkim-signature:domainkey-signature; bh=Eyxowv/IXrlJlptzNrxANzYolyVNNZzZ4TeQolX+7aQ=; b=IROaXOlhZ4/JnR54kEYMNEsmJxUFyhr0j397/16s9nnofij04kNE8MYoa2UOFrCp7L I/SZ1GVCDHIOVsuOJGHSoKY6EjR7iCwTXGvYhbN29bpb/Eh3bIG8/IDxKlTft4RzQ00t OiPKUBNuq/8HjCP8rCs1drvIUzNrNXcvLZ4STf5Db/s2KMhsaNKA+SBHwtapMq7AZveC ZVhwPyCjuafUWCwLaByd40OyHboGUpSDkJege2O4kvYLb7fmC00NR8y0RldgWnvhETI9 6RL+VMG3a+eOoCQv9/PP6NZ45Yu8o+1VKDns+C3asCAXiqmOMqi3vPqpHOQIyrSpfdfD gsuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=hh2UEP88; dkim=pass header.i=@linaro.org header.s=google header.b=hLIltxiC; spf=pass (google.com: domain of libc-alpha-return-106684-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-106684-patch=linaro.org@sourceware.org"; dmarc=pass (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 x31si13550104eda.334.2019.11.06.04.53.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Nov 2019 04:53:26 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-106684-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=hh2UEP88; dkim=pass header.i=@linaro.org header.s=google header.b=hLIltxiC; spf=pass (google.com: domain of libc-alpha-return-106684-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-106684-patch=linaro.org@sourceware.org"; dmarc=pass (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=tbW7FF8HxHNIqczdHeSz65rDAH/QMEP UUTicERcUw0NRxjIcX1XaEbob7+EV3QrovBIYKVME5nOjPmaa1ozxHCNP4AgHzhg xjW3CNFZaizKhMPg11VecFOAkc/AVMbPlhQgVozeRPKN0+F2KdDeQG2LoNhPjh9D fY5JexBRtq/0= 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=ERp6WDUN0XHG8aEe61r9AaIWczw=; b=hh2UE P88I7sG/+22WkGVmOxI8SIgP4RW7HClDRqZKJHwAtgroAEC94MHEATnCZ3SC91fp gC4clCq/hsoXpSDTeloTFTBkYgNqZBewyLoNntS+m8+cToRvPzSlHh1Z5A7vp55r b54QGF2m3GoqaOT0twBiPhgZjmDd6tNVizP+io= Received: (qmail 56793 invoked by alias); 6 Nov 2019 12:52:57 -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 56703 invoked by uid 89); 6 Nov 2019 12:52:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=activities X-HELO: mail-qk1-f193.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=Eyxowv/IXrlJlptzNrxANzYolyVNNZzZ4TeQolX+7aQ=; b=hLIltxiCJXm/6xI6ejzwlTwBtdW15UeuPfrgVbNnfRu26Jmfbi9OU0Zie2jKpI47s3 ZKPD8uUyQdpDDR/h0Tr/8LTI28RxQ3n1wtVHLEOV75sNsskcigcPI7mSKZJxS17I1BJo WNtTGCqL3km34iF59yHQ01uDvm3td4uDe4wXmiQObLxQISHYvu9MBdH5hSoanmiSTaos F7pZqed8EQ+Xn9TUjdHDpANSjjuHZ6R2F1ArNSO34TRABzUCFHo8oTqNx7E41TQDq93K Vy2N5W5nQ3qnk2bHD61eajdeiqfwgeNngUgnx3BHoInN6GzZy6QtFV8H9Wk9JP32fmh3 ZYgg== Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 2/3] Refactor nanosleep in terms of clock_nanosleep Date: Wed, 6 Nov 2019 09:52:44 -0300 Message-Id: <20191106125245.28102-2-adhemerval.zanella@linaro.org> In-Reply-To: <20191106125245.28102-1-adhemerval.zanella@linaro.org> References: <20191106125245.28102-1-adhemerval.zanella@linaro.org> The generic version is straightforward. For Hurd, its nanosleep implementation is moved to clock_nanosleep with adjustments from generic unix implementation. The generic clock_nanosleep unix version is also removed since it calls nanosleep. Checked on x86_64-linux-gnu and powerpc64le-linux-gnu. --- include/time.h | 3 + posix/nanosleep.c | 13 ++-- sysdeps/{unix => mach}/clock_nanosleep.c | 79 +++++++++++++++++------ sysdeps/mach/nanosleep.c | 79 ----------------------- sysdeps/unix/sysv/linux/clock_nanosleep.c | 2 +- sysdeps/unix/sysv/linux/nanosleep.c | 31 --------- time/clock_nanosleep.c | 2 +- 7 files changed, 71 insertions(+), 138 deletions(-) rename sysdeps/{unix => mach}/clock_nanosleep.c (59%) delete mode 100644 sysdeps/mach/nanosleep.c delete mode 100644 sysdeps/unix/sysv/linux/nanosleep.c -- 2.17.1 diff --git a/include/time.h b/include/time.h index 8ac58e891b..b3e635395d 100644 --- a/include/time.h +++ b/include/time.h @@ -25,6 +25,9 @@ libc_hidden_proto (__clock_gettime) extern __typeof (clock_settime) __clock_settime; libc_hidden_proto (__clock_settime) +extern __typeof (clock_nanosleep) __clock_nanosleep; +libc_hidden_proto (__clock_nanosleep); + #ifdef __linux__ extern __typeof (clock_adjtime) __clock_adjtime; libc_hidden_proto (__clock_adjtime); diff --git a/posix/nanosleep.c b/posix/nanosleep.c index d8564c7119..ed41c8cce7 100644 --- a/posix/nanosleep.c +++ b/posix/nanosleep.c @@ -24,10 +24,13 @@ int __nanosleep (const struct timespec *requested_time, struct timespec *remaining) { - __set_errno (ENOSYS); - return -1; + int ret = __clock_nanosleep (CLOCK_REALTIME, 0, requested_time, remaining); + if (ret != 0) + { + __set_errno (ret); + return -1; + } + return 0; } -stub_warning (nanosleep) - -hidden_def (__nanosleep) +libc_hidden_def (__nanosleep) weak_alias (__nanosleep, nanosleep) diff --git a/sysdeps/unix/clock_nanosleep.c b/sysdeps/mach/clock_nanosleep.c similarity index 59% rename from sysdeps/unix/clock_nanosleep.c rename to sysdeps/mach/clock_nanosleep.c index 8514a439ee..6a0792d684 100644 --- a/sysdeps/unix/clock_nanosleep.c +++ b/sysdeps/mach/clock_nanosleep.c @@ -1,5 +1,5 @@ -/* High-resolution sleep with the specified clock. - Copyright (C) 2000-2019 Free Software Foundation, Inc. +/* clock_nanosleep - high-resolution sleep with specifiable clock. + Copyright (C) 2002-2019 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 @@ -16,28 +16,70 @@ License along with the GNU C Library; if not, see . */ -#include #include +#include #include -#include +#include #include -/* This implementation assumes that these is only a `nanosleep' system - call. So we have to remap all other activities. */ +static struct timespec +timespec_sub (struct timespec a, struct timespec b) +{ + struct timespec result = { a.tv_sec - b.tv_sec, + a.tv_nsec - b.tv_nsec }; + if (result.tv_nsec < 0) + { + --result.tv_sec; + result.tv_nsec += 1000000000ul; + } + return result; +} + +static int +nanosleep_call (const struct timespec *req, struct timespec *rem) +{ + mach_port_t recv; + struct timespec before; + error_t err; + + const mach_msg_timeout_t ms + = req->tv_sec * 1000 + + (req->tv_nsec + 999999) / 1000000; + + recv = __mach_reply_port (); + + if (rem != NULL) + __clock_gettime (CLOCK_REALTIME, &before); + + err = __mach_msg (NULL, MACH_RCV_MSG|MACH_RCV_TIMEOUT|MACH_RCV_INTERRUPT, + 0, 0, recv, ms, MACH_PORT_NULL); + __mach_port_destroy (mach_task_self (), recv); + if (err == EMACH_RCV_INTERRUPTED) + { + if (rem != NULL) + { + struct timespec after, elapsed; + __clock_gettime (CLOCK_REALTIME, &after); + elapsed = timespec_sub (after, before); + *rem = timespec_sub (*req, elapsed); + } + + return EINTR; + } + + return 0; +} + int __clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req, struct timespec *rem) { - struct timespec now; - - if (! valid_nanoseconds (req->tv_nsec)) + if (clock_id != CLOCK_REALTIME + || !valid_nanoseconds (req->tv_nsec) + || (flags != 0 || flags != TIMER_ABSTIME)) return EINVAL; - if (clock_id == CLOCK_THREAD_CPUTIME_ID) - return EINVAL; /* POSIX specifies EINVAL for this case. */ - - if (clock_id < CLOCK_REALTIME || clock_id > CLOCK_THREAD_CPUTIME_ID) - return EINVAL; + struct timespec now; /* If we got an absolute time, remap it. */ if (flags == TIMER_ABSTIME) @@ -68,15 +110,10 @@ __clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req, /* Make sure we are not modifying the struct pointed to by REM. */ rem = NULL; } - else if (flags != 0) - return EINVAL; - else if (clock_id != CLOCK_REALTIME) - /* Not supported. */ - return ENOTSUP; - return __nanosleep (req, rem), 0 ? errno : 0; + return nanosleep_call (req, rem); } - +libc_hidden_def (__clock_nanosleep) versioned_symbol (libc, __clock_nanosleep, clock_nanosleep, GLIBC_2_17); /* clock_nanosleep moved to libc in version 2.17; old binaries may expect the symbol version it had in librt. */ diff --git a/sysdeps/mach/nanosleep.c b/sysdeps/mach/nanosleep.c deleted file mode 100644 index b60a2179f6..0000000000 --- a/sysdeps/mach/nanosleep.c +++ /dev/null @@ -1,79 +0,0 @@ -/* nanosleep -- sleep for a period specified with a struct timespec - Copyright (C) 2002-2019 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 - -# define timespec_sub(a, b, result) \ - do { \ - (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ - (result)->tv_nsec = (a)->tv_nsec - (b)->tv_nsec; \ - if ((result)->tv_nsec < 0) { \ - --(result)->tv_sec; \ - (result)->tv_nsec += 1000000000; \ - } \ - } while (0) - -int -__libc_nanosleep (const struct timespec *requested_time, - struct timespec *remaining) -{ - mach_port_t recv; - struct timespec before; - error_t err; - - if (requested_time->tv_sec < 0 - || ! valid_nanoseconds (requested_time->tv_nsec)) - { - errno = EINVAL; - return -1; - } - - const mach_msg_timeout_t ms - = requested_time->tv_sec * 1000 - + (requested_time->tv_nsec + 999999) / 1000000; - - recv = __mach_reply_port (); - - if (remaining != 0) - __clock_gettime (CLOCK_REALTIME, &before); - - err = __mach_msg (NULL, MACH_RCV_MSG|MACH_RCV_TIMEOUT|MACH_RCV_INTERRUPT, - 0, 0, recv, ms, MACH_PORT_NULL); - __mach_port_destroy (mach_task_self (), recv); - if (err == EMACH_RCV_INTERRUPTED) - { - if (remaining != 0) - { - struct timespec after, elapsed; - __clock_gettime (CLOCK_REALTIME, &after); - timespec_sub (&after, &before, &elapsed); - timespec_sub (requested_time, &elapsed, remaining); - } - - errno = EINTR; - return -1; - } - - return 0; -} -weak_alias(__libc_nanosleep, __nanosleep) -libc_hidden_def (__nanosleep) -weak_alias (__libc_nanosleep, nanosleep) diff --git a/sysdeps/unix/sysv/linux/clock_nanosleep.c b/sysdeps/unix/sysv/linux/clock_nanosleep.c index 1f240b8720..f3c6fd2d5f 100644 --- a/sysdeps/unix/sysv/linux/clock_nanosleep.c +++ b/sysdeps/unix/sysv/linux/clock_nanosleep.c @@ -42,7 +42,7 @@ __clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req, return (INTERNAL_SYSCALL_ERROR_P (r, err) ? INTERNAL_SYSCALL_ERRNO (r, err) : 0); } - +libc_hidden_def (__clock_nanosleep) versioned_symbol (libc, __clock_nanosleep, clock_nanosleep, GLIBC_2_17); /* clock_nanosleep moved to libc in version 2.17; old binaries may expect the symbol version it had in librt. */ diff --git a/sysdeps/unix/sysv/linux/nanosleep.c b/sysdeps/unix/sysv/linux/nanosleep.c deleted file mode 100644 index 6787909248..0000000000 --- a/sysdeps/unix/sysv/linux/nanosleep.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Linux nanosleep syscall implementation. - Copyright (C) 2017-2019 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 - -/* Pause execution for a number of nanoseconds. */ -int -__nanosleep (const struct timespec *requested_time, - struct timespec *remaining) -{ - return SYSCALL_CANCEL (nanosleep, requested_time, remaining); -} -hidden_def (__nanosleep) -weak_alias (__nanosleep, nanosleep) diff --git a/time/clock_nanosleep.c b/time/clock_nanosleep.c index 5952d29195..d4fc16f6ec 100644 --- a/time/clock_nanosleep.c +++ b/time/clock_nanosleep.c @@ -33,7 +33,7 @@ __clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req, /* Not implemented. */ return ENOSYS; } - +libc_hidden_def (__clock_nanosleep) versioned_symbol (libc, __clock_nanosleep, clock_nanosleep, GLIBC_2_17); /* clock_nanosleep moved to libc in version 2.17; old binaries may expect the symbol version it had in librt. */ From patchwork Wed Nov 6 12:52:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 178680 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp564759ilf; Wed, 6 Nov 2019 04:53:17 -0800 (PST) X-Google-Smtp-Source: APXvYqyw5Ch3DwzdRJNjDHcGifnLS0bnj2oSN0VH8bIlzuPaL70o0zZ6OcRP9aEYKzjBcNt9bxrl X-Received: by 2002:a17:906:2921:: with SMTP id v1mr34449040ejd.236.1573044797809; Wed, 06 Nov 2019 04:53:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573044797; cv=none; d=google.com; s=arc-20160816; b=OKplg0SlBYVwhcRxaY78Ckekm88Wo5xut7SC+Xo1BBhqVeObgmH1W9H36q+jPC38NB ZXimbW9wAXiDz8BtxhSZU8O50XZFpEGJS7VmM8PNdEP25yRUZewPIUuU5tAya2Kxcxdn hCaVXRhA/wgHXxE9I5wHLc41i8brel/xy6+aaM26Aij7ArkGwujny6NNs17ad0l/D4ok bFBCzhjmAwfH+W273m9M4rABk6xjFuVzZGIOlRFrtcsD6TzkGb9XwFsmP+9YqDZbpMp9 PJ1WfIivwyRMuweoKCdHp5CoEdf0lyERIel+GcjRG6sKbmHK7v3naYiG8AWwBpHztblL LPGQ== 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 :dkim-signature:delivered-to:sender:list-help:list-post:list-archive :list-subscribe:list-unsubscribe:list-id:precedence:mailing-list :dkim-signature:domainkey-signature; bh=Lm2bajqT/mICCW4kUqd6sM3NtKsKx7Z8gWerQM2whl8=; b=KSy4aHzRoK2RVHvnP7DZWSmCG0hjh+DH/usUV6jnl0v7cmWatSWjFvfzMcxN0TA/OU /+CICN+xAAYeEIu7xdwEdBtywZsB9OhR+m7ZX3pYlAP+qjF58ZS8BeOHE+xA7W8fDJll 2YxoqFzuysOg6LueXtwrK3Ouir9ZNqIyM0haavYpHJ/Aw2X+bjuY7mLV4MfNExDjt4Ds QpxJ1HfLeQJTdWK18HcSI3AVTpwXmVOb2N3DdyzRIKRphzhOjJ8tx1AtKWm2UD8t4V+1 zzcEIr8tn17BSlwjo7xYS5cCWsYOv4j3oRDWIETgCF6ezMEXcdDpCP5rayL0II5nNM52 CeAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=Ge3aySwt; dkim=pass header.i=@linaro.org header.s=google header.b=N297IE9U; spf=pass (google.com: domain of libc-alpha-return-106683-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-106683-patch=linaro.org@sourceware.org"; dmarc=pass (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 o12si15761451ejn.292.2019.11.06.04.53.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Nov 2019 04:53:17 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-106683-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=Ge3aySwt; dkim=pass header.i=@linaro.org header.s=google header.b=N297IE9U; spf=pass (google.com: domain of libc-alpha-return-106683-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-106683-patch=linaro.org@sourceware.org"; dmarc=pass (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=WqY/qZ2lHTSkzD/tJ7eDu0Ok1hRunPk MAGSwul/DblUI658idWjkb7e5Up+ffb1QZAzLdOiG8RF81fD75NJmCMmDPQubBdI 1ayRurzs2JabBynXYBobVWJpEBQLaCBVZ6r9dNCEiZiHJt8Po+NaYCfKW8ec6QnM vHai+7FRVPdc= 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=XumTox4khTSQbeIPEpt+EI2g/ow=; b=Ge3ay Swt72z9aXr5IEbtmcscBS0/T4rBevNYc2PHIZcBDJgHDY1QuAgREB78Y92T7apjD 4qIEZFKJSXSIU9X7Tbg/GIeBQtkzw4n3twmJ21uivyOcG3GYEBsnNV94qUMhpuA0 9sZcNeA+LXS1Mc6X2TqSvzpPEO6lcTUHCe3HLA= Received: (qmail 56734 invoked by alias); 6 Nov 2019 12:52:57 -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 56702 invoked by uid 89); 6 Nov 2019 12:52:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1143, states X-HELO: mail-qt1-f194.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=Lm2bajqT/mICCW4kUqd6sM3NtKsKx7Z8gWerQM2whl8=; b=N297IE9UJ7+4b1Hq0C4/4DkkrWGoYp2IldYbNPzLWJswmvtG9WPYGw2DRcc+UKxe95 kEovXrnjnD9W8DKwFYxibG5ybal6FV5w08JAkrjkW6a4Uj+B3WKcNW6izQABGRb1uQWh H/GRY3zm2LGwjag6k42Z4cyW56NMSgLqyKFGll86DMFOzHnDHD1Nmv3kzkTsV/olR8jN 3ccGmgObmj4uoxhWPRWogs4xZbLb+KAbx5i7rjrabeDuDyH5ztOQj2FuKrxYFJrBtjud qJQ8qVOZpHZwudPHxYPPA6iN18mKqGFMNgMins35+ewbZxskw13dRkcv+V64A+x6ZiwC 4I8A== Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 3/3] nptl: Refactor thrd_sleep in terms of clock_nanosleep Date: Wed, 6 Nov 2019 09:52:45 -0300 Message-Id: <20191106125245.28102-3-adhemerval.zanella@linaro.org> In-Reply-To: <20191106125245.28102-1-adhemerval.zanella@linaro.org> References: <20191106125245.28102-1-adhemerval.zanella@linaro.org> Checked on x86_64-linux-gnu and powerpc64le-linux-gnu. --- nptl/thrd_sleep.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) -- 2.17.1 diff --git a/nptl/thrd_sleep.c b/nptl/thrd_sleep.c index 2e185dd748..3f5e307d56 100644 --- a/nptl/thrd_sleep.c +++ b/nptl/thrd_sleep.c @@ -24,16 +24,13 @@ int thrd_sleep (const struct timespec* time_point, struct timespec* remaining) { - INTERNAL_SYSCALL_DECL (err); - int ret = INTERNAL_SYSCALL_CANCEL (nanosleep, err, time_point, remaining); - if (INTERNAL_SYSCALL_ERROR_P (ret, err)) - { - /* C11 states thrd_sleep function returns -1 if it has been interrupted - by a signal, or a negative value if it fails. */ - ret = INTERNAL_SYSCALL_ERRNO (ret, err); - if (ret == EINTR) - return -1; - return -2; - } - return 0; + int ret = __clock_nanosleep (CLOCK_REALTIME, 0, time_point, remaining); + /* C11 states thrd_sleep function returns -1 if it has been interrupted + by a signal, or a negative value if it fails. */ + switch (ret) + { + case 0: return 0; + case EINTR: return -1; + default: return -2; + } }