public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: David Holsgrove <david.holsgrove@xilinx.com>
To: <libc-ports@sourceware.org>
Cc: Kirk Meyer <kirk.meyer@sencore.com>,
	David Holsgrove	<david.holsgrove@xilinx.com>
Subject: [COMMITTED PATCH] MicroBlaze: negated errors in lowlevellock.h
Date: Fri, 14 Jun 2013 02:39:00 -0000	[thread overview]
Message-ID: <86c017db-2425-4242-9d7d-254ce818c215@DB8EHSMHS027.ehs.local> (raw)

From: Kirk Meyer <kirk.meyer@sencore.com>

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 <kirk.meyer@sencore.com>
Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
---
 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 <david.holsgrove@xilinx.com>
+
+	* sysdeps/unix/sysv/linux/microblaze/nptl/lowlevellock.h: Correct
+	return from macros.
+
 2013-06-05  Ondřej Bílka  <neleai@seznam.cz>
 
 	* 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 = INTERNAL_SYSCALL (futex, __err, 4, (long) (futexp),                \
                   __lll_private_flag (FUTEX_WAIT, private),                    \
                   (val), (timespec));                                          \
-    INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret;                  \
+    __ret;                                                                     \
   })
 
 #define lll_futex_timed_wait_bitset(futexp, val, timespec, clockbit, private)  \
@@ -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;                                                                     \
   })
 
 #define lll_futex_wake(futexp, nr, private)                                    \
@@ -109,7 +109,7 @@
     __ret = INTERNAL_SYSCALL (futex, __err, 4, (long) (futexp),                \
                   __lll_private_flag (FUTEX_WAKE, private),                    \
                   (nr), 0);                                                    \
-    INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret;                  \
+    __ret;                                                                     \
   })
 
 #define lll_robust_dead(futexv, private)                                       \
@@ -160,7 +160,7 @@
     __ret = INTERNAL_SYSCALL (futex, __err, 5, (futexp),                       \
                   __lll_private_flag (__op, private),                          \
                   (val), (timespec), mutex);                                   \
-    INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret;                  \
+    __ret;                                                                     \
   })
 
 #define lll_futex_cmp_requeue_pi(futexp, nr_wake, nr_move, mutex, val, priv)   \
-- 
1.7.9.5


                 reply	other threads:[~2013-06-14  2:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86c017db-2425-4242-9d7d-254ce818c215@DB8EHSMHS027.ehs.local \
    --to=david.holsgrove@xilinx.com \
    --cc=kirk.meyer@sencore.com \
    --cc=libc-ports@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).