From 5418ef694ee17c698270702d927f04836706e60b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Fri, 27 Nov 2009 16:12:44 +0000 Subject: PIC fixes for hardened MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Timo Teräs Signed-off-by: Natanael Copa Signed-off-by: Austin Foxley --- libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch | 7 ++++--- libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'libpthread/nptl/sysdeps/unix') 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; }) -- cgit v1.2.3