summaryrefslogtreecommitdiff
path: root/libpthread
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread')
-rw-r--r--libpthread/nptl/sysdeps/pthread/Makefile.in4
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch7
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h6
3 files changed, 10 insertions, 7 deletions
diff --git a/libpthread/nptl/sysdeps/pthread/Makefile.in b/libpthread/nptl/sysdeps/pthread/Makefile.in
index 2a825329a..45240152c 100644
--- a/libpthread/nptl/sysdeps/pthread/Makefile.in
+++ b/libpthread/nptl/sysdeps/pthread/Makefile.in
@@ -23,8 +23,8 @@ libpthread_CSRC = pthread_barrier_wait.c pthread_cond_broadcast.c \
ifeq ($(TARGET_ARCH),i386)
X86_PTHREAD_EXCLUDE_LIST = pthread_spin_unlock.c pthread_spin_init.c \
- pthread_cond_wait.c pthread_barrier_wait.c pthread_cond_broadcast.c \
- pthread_cond_signal.c pthread_cond_timedwait.c pthread_rwlock_timedrdlock.c \
+ pthread_barrier_wait.c pthread_cond_broadcast.c \
+ pthread_cond_signal.c pthread_rwlock_timedrdlock.c \
pthread_rwlock_timedwrlock.c pthread_rwlock_unlock.c pthread_rwlock_wrlock.c \
pthread_rwlock_rdlock.c
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch
index 06c0bd8b8..740ee7fcb 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch
@@ -15,9 +15,10 @@ libc_a_CSRC = fork.c
libc_a_SSRC = clone.S vfork.S
libpthread_SSRC += i486/lowlevellock.S i486/pthread_barrier_wait.S i486/pthread_cond_signal.S i486/pthread_cond_broadcast.S \
- i486/pthread_cond_timedwait.S i486/pthread_cond_wait.S i486/sem_post.S i486/sem_timedwait.S \
- i486/sem_trywait.S i486/sem_wait.S i486/pthread_rwlock_rdlock.S i486/pthread_rwlock_wrlock.S \
- i486/pthread_rwlock_timedrdlock.S i486/pthread_rwlock_timedwrlock.S i486/pthread_rwlock_unlock.S
+ i486/sem_post.S i486/sem_timedwait.S \
+ i486/sem_trywait.S i486/sem_wait.S i486/pthread_rwlock_rdlock.S i486/pthread_rwlock_wrlock.S \
+ i486/pthread_rwlock_timedrdlock.S i486/pthread_rwlock_timedwrlock.S i486/pthread_rwlock_unlock.S
+#i486/pthread_cond_timedwait.S i486/pthread_cond_wait.S
libc_a_SSRC += i486/libc-lowlevellock.S
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
index 785f2acf2..1a060c0f4 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
@@ -65,8 +65,10 @@ typedef int lll_lock_t;
/* Delay in spinlock loop. */
#define BUSY_WAIT_NOP __asm__ ("rep; nop")
-
#define lll_futex_wait(futex, val) \
+ lll_futex_timed_wait (futex, val, NULL)
+
+#define lll_futex_timed_wait(futex, val, timeout) \
({ \
int __ret; \
register __typeof (val) _val __asm__ ("edx") = (val); \
@@ -74,7 +76,7 @@ typedef int lll_lock_t;
LLL_ENTER_KERNEL \
LLL_EBX_LOAD \
: "=a" (__ret) \
- : "0" (SYS_futex), LLL_EBX_REG (futex), "S" (0), \
+ : "0" (SYS_futex), LLL_EBX_REG (futex), "S" (timeout), \
"c" (FUTEX_WAIT), "d" (_val), \
"i" (offsetof (tcbhead_t, sysinfo))); \
__ret; })