projects
/
platform
/
upstream
/
linaro-glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
586d174
)
(__lll_mutex_cond_lock): New function. (lll_mutex_cond_lock): Define.
author
Jakub Jelinek
<jakub@redhat.com>
Fri, 30 May 2003 13:46:04 +0000
(13:46 +0000)
committer
Jakub Jelinek
<jakub@redhat.com>
Fri, 30 May 2003 13:46:04 +0000
(13:46 +0000)
nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
patch
|
blob
|
history
diff --git
a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
index
4d95319
..
7934c0e
100644
(file)
--- a/
nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
+++ b/
nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
@@
-142,6
+142,19
@@
__lll_mutex_lock (int *futex)
}
#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex))
+static inline void
+__attribute__ ((always_inline))
+__lll_mutex_cond_lock (int *futex)
+{
+ int oldval;
+ int newval;
+
+ lll_compare_and_swap (futex, oldval, newval, "lr %2,%1; ahi %2,2");
+ if (oldval > 0)
+ ___lll_mutex_lock (futex, newval);
+}
+#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex))
+
extern int ___lll_mutex_timedlock (int *, const struct timespec *, int)
attribute_hidden;