From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10631 invoked by alias); 14 Jun 2013 02:39:47 -0000 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 Received: (qmail 10464 invoked by uid 89); 14 Jun 2013 02:39:46 -0000 X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,SPF_PASS autolearn=ham version=3.3.1 Received: from mail-db8lp0189.outbound.messaging.microsoft.com (HELO db8outboundpool.messaging.microsoft.com) (213.199.154.189) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 14 Jun 2013 02:39:45 +0000 Received: from mail118-db8-R.bigfish.com (10.174.8.238) by DB8EHSOBE040.bigfish.com (10.174.4.103) with Microsoft SMTP Server id 14.1.225.23; Fri, 14 Jun 2013 02:39:42 +0000 Received: from mail118-db8 (localhost [127.0.0.1]) by mail118-db8-R.bigfish.com (Postfix) with ESMTP id 541573E02C7; Fri, 14 Jun 2013 02:39:42 +0000 (UTC) X-Forefront-Antispam-Report: CIP:149.199.60.83;KIP:(null);UIP:(null);IPV:NLI;H:xsj-gw1;RD:unknown-60-83.xilinx.com;EFVD:NLI X-SpamScore: -1 X-BigFish: VPS-1(z3e12hzc89bh936eI154dIzz1f42h1ee6h1de0h1fdah1202h1e76h1d1ah1d2ah1fc6hzz8275bhz2fh95h668h839h93fhd24hf0ah119dh1288h12a5h12a9h12bdh137ah139eh13b6h1441h14ddh1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1b0ah1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e1dh1e23h906i1155h192ch) Received-SPF: pass (mail118-db8: domain of xilinx.com designates 149.199.60.83 as permitted sender) client-ip=149.199.60.83; envelope-from=david.holsgrove@xilinx.com; helo=xsj-gw1 ;helo=xsj-gw1 ; Received: from mail118-db8 (localhost.localdomain [127.0.0.1]) by mail118-db8 (MessageSwitch) id 1371177579603425_18770; Fri, 14 Jun 2013 02:39:39 +0000 (UTC) Received: from DB8EHSMHS027.bigfish.com (unknown [10.174.8.252]) by mail118-db8.bigfish.com (Postfix) with ESMTP id 8596EC0046; Fri, 14 Jun 2013 02:39:39 +0000 (UTC) Received: from xsj-gw1 (149.199.60.83) by DB8EHSMHS027.bigfish.com (10.174.4.37) with Microsoft SMTP Server id 14.16.227.3; Fri, 14 Jun 2013 02:39:38 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-smtp1.xilinx.com) by xsj-gw1 with esmtp (Exim 4.63) (envelope-from ) id 1UnJvO-0002XQ-9M; Thu, 13 Jun 2013 19:39:38 -0700 From: David Holsgrove To: CC: Kirk Meyer , David Holsgrove Subject: =?UTF-8?q?=5BCOMMITTED=20PATCH=5D=20MicroBlaze=3A=20negated=20errors=20in=20lowlevellock=2Eh?= Date: Fri, 14 Jun 2013 02:39:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-RCIS-Action: ALLOW Message-ID: <86c017db-2425-4242-9d7d-254ce818c215@DB8EHSMHS027.ehs.local> Content-Transfer-Encoding: quoted-printable X-OriginatorOrg: xilinx.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% X-SW-Source: 2013-06/txt/msg00016.txt.bz2 From: Kirk Meyer The macros in lowlevellock.h are returning positive errors, but the users of the macros expect negative. This causes e.g. sem_wait to sometimes return an error with errno set to -EWOULDBLOCK. Signed-off-by: Kirk Meyer Signed-off-by: David Holsgrove --- ports/ChangeLog.microblaze | 5 +++++ .../unix/sysv/linux/microblaze/nptl/lowlevellock.h | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ports/ChangeLog.microblaze b/ports/ChangeLog.microblaze index 79658fb..eb60f5b 100644 --- a/ports/ChangeLog.microblaze +++ b/ports/ChangeLog.microblaze @@ -1,3 +1,8 @@ +2013-06-14 David Holsgrove + + * sysdeps/unix/sysv/linux/microblaze/nptl/lowlevellock.h: Correct + return from macros. + 2013-06-05 Ond=C5=99ej B=C3=ADlka =20 * sysdeps/microblaze/bits/atomic.h: Remove executable mode. diff --git a/ports/sysdeps/unix/sysv/linux/microblaze/nptl/lowlevellock.h b= /ports/sysdeps/unix/sysv/linux/microblaze/nptl/lowlevellock.h index 45b8d9a..70f5537 100644 --- a/ports/sysdeps/unix/sysv/linux/microblaze/nptl/lowlevellock.h +++ b/ports/sysdeps/unix/sysv/linux/microblaze/nptl/lowlevellock.h @@ -87,7 +87,7 @@ __ret =3D INTERNAL_SYSCALL (futex, __err, 4, (long) (futexp), = \ __lll_private_flag (FUTEX_WAIT, private), = \ (val), (timespec)); = \ - INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; = \ + __ret; = \ }) =20 #define lll_futex_timed_wait_bitset(futexp, val, timespec, clockbit, priva= te) \ @@ -99,7 +99,7 @@ __lll_private_flag (__op, private), = \ (val), (timespec), NULL /* Unused. */, = \ FUTEX_BITSET_MATCH_ANY); = \ - INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; = \ + __ret; = \ }) =20 #define lll_futex_wake(futexp, nr, private) = \ @@ -109,7 +109,7 @@ __ret =3D INTERNAL_SYSCALL (futex, __err, 4, (long) (futexp), = \ __lll_private_flag (FUTEX_WAKE, private), = \ (nr), 0); = \ - INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; = \ + __ret; = \ }) =20 #define lll_robust_dead(futexv, private) = \ @@ -160,7 +160,7 @@ __ret =3D INTERNAL_SYSCALL (futex, __err, 5, (futexp), = \ __lll_private_flag (__op, private), = \ (val), (timespec), mutex); = \ - INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; = \ + __ret; = \ }) =20 #define lll_futex_cmp_requeue_pi(futexp, nr_wake, nr_move, mutex, val, pri= v) \ --=20 1.7.9.5