mirror of
git://sourceware.org/git/glibc.git
synced 2025-01-30 12:31:53 +08:00
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.
This commit is contained in:
parent
7e0bd9eb99
commit
9cd7e988d3
@ -1,3 +1,9 @@
|
||||
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.
|
||||
|
||||
2007-10-22 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (F_DUPFD_CLOEXEC): Define.
|
||||
|
@ -289,22 +289,20 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime,
|
||||
#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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user