forked from rpms/glibc
2.3.90-38
This commit is contained in:
parent
7cded629f3
commit
4779efd52d
@ -1466,17 +1466,18 @@
|
||||
static inline void __attribute__ ((always_inline))
|
||||
__lll_mutex_unlock (int *futex)
|
||||
{
|
||||
@@ -152,6 +201,16 @@ __lll_mutex_unlock (int *futex)
|
||||
@@ -152,6 +201,17 @@ __lll_mutex_unlock (int *futex)
|
||||
|
||||
|
||||
static inline void __attribute__ ((always_inline))
|
||||
+__lll_robust_mutex_unlock (int *futex)
|
||||
+__lll_robust_mutex_unlock (int *futex, int mask)
|
||||
+{
|
||||
+ int val = atomic_exchange_rel (futex, 0);
|
||||
+ if (__builtin_expect (val & FUTEX_WAITERS, 0))
|
||||
+ if (__builtin_expect (val & mask, 0))
|
||||
+ lll_futex_wake (futex, 1);
|
||||
+}
|
||||
+#define lll_robust_mutex_unlock(futex) __lll_robust_mutex_unlock(&(futex))
|
||||
+#define lll_robust_mutex_unlock(futex) \
|
||||
+ __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS)
|
||||
+
|
||||
+
|
||||
+static inline void __attribute__ ((always_inline))
|
||||
@ -1866,17 +1867,17 @@
|
||||
|
||||
static inline void
|
||||
__attribute__ ((always_inline))
|
||||
+__lll_robust_mutex_unlock (int *futex)
|
||||
+__lll_robust_mutex_unlock (int *futex, int mask)
|
||||
+{
|
||||
+ int oldval;
|
||||
+ int newval = 0;
|
||||
+
|
||||
+ lll_compare_and_swap (futex, oldval, newval, "slr %2,%2");
|
||||
+ if (oldval & FUTEX_WAITERS)
|
||||
+ if (oldval & mask)
|
||||
+ lll_futex_wake (futex, 1);
|
||||
+}
|
||||
+#define lll_robust_mutex_unlock(futex) \
|
||||
+ __lll_robust_mutex_unlock(&(futex))
|
||||
+ __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS)
|
||||
+
|
||||
+
|
||||
+static inline void
|
||||
|
Loading…
Reference in New Issue
Block a user