From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17544 invoked by alias); 21 Feb 2013 01:01:35 -0000 Received: (qmail 17517 invoked by uid 22791); 21 Feb 2013 01:01:34 -0000 X-SWARE-Spam-Status: No, hits=-5.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ve0-f172.google.com (HELO mail-ve0-f172.google.com) (209.85.128.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 21 Feb 2013 01:01:16 +0000 Received: by mail-ve0-f172.google.com with SMTP id cz11so7439006veb.31 for ; Wed, 20 Feb 2013 17:01:15 -0800 (PST) X-Received: by 10.52.22.74 with SMTP id b10mr25173632vdf.96.1361408475627; Wed, 20 Feb 2013 17:01:15 -0800 (PST) Received: from anchor.com (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPS id e8sm70398036vdt.7.2013.02.20.17.01.14 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 20 Feb 2013 17:01:14 -0800 (PST) From: Richard Henderson To: libc-ports@sourceware.org Subject: [COMMITED 2/2] Add FUTEX_*_REQUEUE_PI support for Alpha. Date: Thu, 21 Feb 2013 01:01:00 -0000 Message-Id: <1361408440-19708-2-git-send-email-rth@twiddle.net> In-Reply-To: <1361408440-19708-1-git-send-email-rth@twiddle.net> References: <1361408440-19708-1-git-send-email-rth@twiddle.net> X-IsSubscribed: yes Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2013-02/txt/msg00060.txt.bz2 --- ports/ChangeLog.alpha | 10 +++++++++ .../unix/sysv/linux/alpha/nptl/lowlevellock.h | 25 ++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/ports/ChangeLog.alpha b/ports/ChangeLog.alpha index 9cd2076..2814559 100644 --- a/ports/ChangeLog.alpha +++ b/ports/ChangeLog.alpha @@ -1,3 +1,13 @@ +2013-02-19 Richard Henderson + + [BZ #14920] + * sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h + (FUTEX_WAIT_REQUEUE_PI): Define. + (FUTEX_CMP_REQUEUE_PI): Likewise. + (lll_futex_wait_requeue_pi): Likewise. + (lll_futex_timed_wait_requeue_pi): Likewise. + (lll_futex_cmp_requeue_pi): Likewise. + 2013-02-20 Richard Henderson * sysdeps/unix/alpha/sysdep.h: Include . diff --git a/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index e50324c..cf6b8bf 100644 --- a/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -38,6 +38,8 @@ #define FUTEX_TRYLOCK_PI 8 #define FUTEX_WAIT_BITSET 9 #define FUTEX_WAKE_BITSET 10 +#define FUTEX_WAIT_REQUEUE_PI 11 +#define FUTEX_CMP_REQUEUE_PI 12 #define FUTEX_PRIVATE_FLAG 128 #define FUTEX_CLOCK_REALTIME 256 @@ -143,8 +145,31 @@ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ }) +/* Priority Inheritance support. */ +#define lll_futex_wait_requeue_pi(futexp, val, mutex, private) \ + lll_futex_timed_wait_requeue_pi (futexp, val, NULL, 0, mutex, private) +#define lll_futex_timed_wait_requeue_pi(futexp, val, timespec, clockbit, \ + mutex, private) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + int __op = FUTEX_WAIT_REQUEUE_PI | clockbit; \ + \ + INTERNAL_SYSCALL (futex, __err, 5, (futexp), \ + __lll_private_flag (__op, private), \ + (val), (timespec), mutex); \ + }) +#define lll_futex_cmp_requeue_pi(futexp, nr_wake, nr_move, mutex, val, priv) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ + __lll_private_flag (FUTEX_CMP_REQUEUE_PI, priv),\ + (nr_wake), (nr_move), (mutex), (val)); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ + }) static inline int __attribute__((always_inline)) __lll_trylock(int *futex) -- 1.8.1.2