aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c b/nptl/sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c
index 40b5c3e441..7035479c1a 100644
--- a/nptl/sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c
+++ b/nptl/sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c
@@ -17,5 +17,26 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-/* No difference to lowlevellock.c */
-#include "lowlevellock.c"
+#include <errno.h>
+#include <sysdep.h>
+#include <lowlevellock.h>
+#include <sys/time.h>
+
+
+void
+___lll_lock (futex, newval)
+ int *futex;
+ int newval;
+{
+ do
+ {
+ int oldval;
+
+ lll_futex_wait (futex, newval);
+ lll_compare_and_swap (futex, oldval, newval, "lr %2,%1; ahi %2,-1");
+ }
+ while (newval != 0);
+
+ *futex = -1;
+}
+hidden_proto (___lll_lock)