This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] hppa build failure with tls and lowlevellock.h


Carlos,

It turns out the reason we fail and others don't is that we use an
inline function (so it's parsed right away) and everyone else uses a
#define.  You're probably still right that the include is unnecessary,
but in the meantime this aligns us with everyone else and allows the
build to continue.

Okay to commit?

2007-12-05  Jeff Bailey  <jeffbailey@google.com>

        * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
           (__lll_unlock): Use define instead of inline function.
           (__lll_robust_unlock): Likewise.

-- 
Jeff Bailey - http://www.raspberryginger.com/jbailey/
--- ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h.old	2007-12-05 19:12:32.000000000 +0000
+++ ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h	2007-12-05 19:19:35.000000000 +0000
@@ -289,22 +289,20 @@
 #define lll_robust_timedlock(futex, abstime, id, private) \
   __lll_robust_timedlock (&(futex), abstime, id, private)
 
-static inline void __attribute__ ((always_inline))
-__lll_unlock (lll_lock_t *futex, int private)
-{
-  int val = atomic_exchange_rel (futex, 0);
-  if (__builtin_expect (val > 1, 0))
-    lll_futex_wake (futex, 1, private);
-}
+#define __lll_unlock(futex, private) \
+  (void)					\
+  ({ int val = atomic_exchange_rel (futex, 0);  \
+     if (__builtin_expect (val > 1, 0))         \
+       lll_futex_wake (futex, 1, private);      \
+  })
 #define lll_unlock(futex, private) __lll_unlock(&(futex), private)
 
-static inline void __attribute__ ((always_inline))
-__lll_robust_unlock (int *futex, int private)
-{
-  int val = atomic_exchange_rel (futex, 0);
-  if (__builtin_expect (val & FUTEX_WAITERS, 0))
-    lll_futex_wake (futex, 1, private);
-}
+#define  __lll_robust_unlock(futex,private) \
+  (void)                                               \
+    ({ int val = atomic_exchange_rel (futex, 0);       \
+       if (__builtin_expect (val & FUTEX_WAITERS, 0))  \
+         lll_futex_wake (futex, 1, private);           \
+    })
 #define lll_robust_unlock(futex, private) \
   __lll_robust_unlock(&(futex), private)
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]