From patchwork Tue Apr 4 21:02:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 96765 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp375926qgd; Tue, 4 Apr 2017 14:03:00 -0700 (PDT) X-Received: by 10.84.232.77 with SMTP id f13mr31547821pln.95.1491339780021; Tue, 04 Apr 2017 14:03:00 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id g20si18501201pfe.360.2017.04.04.14.02.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Apr 2017 14:03:00 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-78434-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-78434-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-78434-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=yfN6/MRjQaB3AJVz51rkLPiHvIrdeCoITu5gNrA335EviSvMnDeR8 e9/OAz/9YAyVLqXSueOBGNLY9LnbX0oDluyI+6L1taMM9+1n1GAA2HWmeWD9Nj88 3wm8xyI5tii/r+iBhMNEy0kKxSVnYxViUk67RIIJSEKF8wJnxbLvKQ= 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=cGZmT4SqhoySymDyiV9WkxwCNmI=; b=KkRN8ux7EVV5zvmI4rZOIf8i4EL2 haD2y5AwuYZF6uTi7sb/i/lyiz7wfwq1X5PckldZ1sqLSo9958YONP6FBHKHn7Nt KkxoitUZ30KgCeWp9Qh165MWBnqQ4Yk4UgawWGCGnVkrDGhhEwW2zLDsDMLjWcJ+ y074/74NAntO+6c= Received: (qmail 129068 invoked by alias); 4 Apr 2017 21:02:49 -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 129046 invoked by uid 89); 4 Apr 2017 21:02:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.4 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=10111, 6036 X-HELO: mail-qt0-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; bh=bQfL86kDrZSWzF8SFZbNOFl7MzTlZV9o8i5Q+hUiggw=; b=QKXcenB0b6JjOBWStCbv4aJgsl7GzJfKkULB641nEk90aDhDLnq9belsInaqOum+Xe NcT/UidG21KgYDcN8ndV9cNBZfrUhU+ANl7aGdk8IuQLuywYA3boN8a8yVBrRmEhXoMT kKdds/Mfey3GIOwrln0X/SsPP4Ipu0rL/JTP7eM0OUDfBPfIELmpf7G5ev2/UIJmB69d F95nbdENQjPNPohPbWbbAsTNc9enXCjGsgQBk2I8Z3hoUq2HK9UfzMEsAFZU63ajVASr MmK1iMQ5kVhgiXZJMccvUm3NQa3GNTfKg40KicSql31bHi5ju5d0mekdRq/YQgbbS9hu sF8Q== X-Gm-Message-State: AFeK/H1Pkbq9YkaBBNFZ0ml05GMS/qVg89IitcHqSOKXfcNKdLbU5GU0trv0OaMkl+wELm0q X-Received: by 10.200.55.55 with SMTP id o52mr25287147qtb.279.1491339765199; Tue, 04 Apr 2017 14:02:45 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH] Remove __ASSUME_REQUEUE_PI (committed) Date: Tue, 4 Apr 2017 18:02:32 -0300 Message-Id: <1491339752-24305-1-git-send-email-adhemerval.zanella@linaro.org> The new cond var implementation (ed19993b5b0d) removed all the __ASSUME_{REQUEUE_PI,FUTEX_LOCK_PI} internal usage so there is no need to keep defining it. This patch removes all USE_REQUEUE_PI and __ASSUME_REQUEUE_PI. It is as follow up from BZ#18463. Checked with a build for x86_64-linux-gnu, arm-linux-gnueabhf, m68-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu. * nptl/pthreadP.h (USE_REQUEUE_PI): Remove ununsed macro. * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_REQUEUE_PI): Likewise. * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_REQUEUE_PI): Likewise. * sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_REQUEUE_PI): Likewise. * sysdeps/unix/sysv/linux/mips/kernel-features.h (__ASSUME_REQUEUE_PI): Likewise. * sysdeps/unix/sysv/linux/sparc/kernel-features.h (__ASSUME_REQUEUE_PI): Likewise. --- ChangeLog | 14 ++++++++++++++ nptl/pthreadP.h | 12 ------------ sysdeps/unix/sysv/linux/arm/kernel-features.h | 1 - sysdeps/unix/sysv/linux/kernel-features.h | 5 ----- sysdeps/unix/sysv/linux/m68k/kernel-features.h | 1 - sysdeps/unix/sysv/linux/mips/kernel-features.h | 1 - sysdeps/unix/sysv/linux/sparc/kernel-features.h | 1 - 7 files changed, 14 insertions(+), 21 deletions(-) -- 2.7.4 diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index 4f76cbb..7fc1e50 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -603,18 +603,6 @@ extern void __wait_lookup_done (void) attribute_hidden; # define PTHREAD_STATIC_FN_REQUIRE(name) __asm (".globl " #name); #endif -/* Test if the mutex is suitable for the FUTEX_WAIT_REQUEUE_PI operation. */ -#if (defined lll_futex_wait_requeue_pi \ - && defined __ASSUME_REQUEUE_PI) -# define USE_REQUEUE_PI(mut) \ - ((mut) && (mut) != (void *) ~0l \ - && (((mut)->__data.__kind \ - & (PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NORMAL_NP)) \ - == PTHREAD_MUTEX_PRIO_INHERIT_NP)) -#else -# define USE_REQUEUE_PI(mut) 0 -#endif - /* Returns 0 if POL is a valid scheduling policy. */ static inline int check_sched_policy_attr (int pol) diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h index 4923dfd..e13b049 100644 --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h @@ -23,7 +23,6 @@ futex_atomic_cmpxchg_inatomic, depending on kernel configuration. */ #if __LINUX_KERNEL_VERSION < 0x030E03 -# undef __ASSUME_REQUEUE_PI # undef __ASSUME_SET_ROBUST_LIST #endif diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index 318fcf9..e6a2720 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -101,11 +101,6 @@ #define __ASSUME_PREADV 1 #define __ASSUME_PWRITEV 1 -/* Support for FUTEX_*_REQUEUE_PI was added in 2.6.31 (but some - architectures lack futex_atomic_cmpxchg_inatomic in some - configurations). */ -#define __ASSUME_REQUEUE_PI 1 - /* Support for recvmmsg functionality was added in 2.6.33. The macros defined correspond to those for accept4. */ #if __LINUX_KERNEL_VERSION >= 0x020621 diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h index 55c80d7..cdd5e6c 100644 --- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h +++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h @@ -50,7 +50,6 @@ /* No support for PI futexes or robust mutexes before 3.10 for m68k. */ #if __LINUX_KERNEL_VERSION < 0x030a00 -# undef __ASSUME_REQUEUE_PI # undef __ASSUME_SET_ROBUST_LIST #endif diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h index e0a4994..d5d35af 100644 --- a/sysdeps/unix/sysv/linux/mips/kernel-features.h +++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h @@ -24,7 +24,6 @@ /* The MIPS kernel does not support futex_atomic_cmpxchg_inatomic if emulating LL/SC. */ #if __mips == 1 || defined _MIPS_ARCH_R5900 -# undef __ASSUME_REQUEUE_PI # undef __ASSUME_SET_ROBUST_LIST #endif diff --git a/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/sysdeps/unix/sysv/linux/sparc/kernel-features.h index 8e74478..c833201 100644 --- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h +++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h @@ -34,7 +34,6 @@ /* 32-bit SPARC kernels do not support futex_atomic_cmpxchg_inatomic. */ #if !defined __arch64__ && !defined __sparc_v9__ -# undef __ASSUME_REQUEUE_PI # undef __ASSUME_SET_ROBUST_LIST #endif