@@ -1,5 +1,12 @@
2015-12-30 Aurelien Jarno <aurelien@aurel32.net>
+ * nptl/pthread_cond_timedwait.c [!__NR_clock_gettime]
+ (__pthread_cond_timedwait): Remove compatibility code.
+ * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
+ [!__NR_clock_gettime] (__pthread_cond_timedwait): Likewise.
+
+2015-12-30 Aurelien Jarno <aurelien@aurel32.net>
+
* sysdeps/unix/sysv/linux/dl-openat64.c [!__NR_openat] (openat64):
Remove compatibility code.
@@ -117,7 +117,6 @@ __pthread_cond_timedwait (pthread_cond_t *cond, pthread_mutex_t *mutex,
|| !defined lll_futex_timed_wait_bitset)
struct timespec rt;
{
-# ifdef __NR_clock_gettime
INTERNAL_SYSCALL_DECL (err);
(void) INTERNAL_VSYSCALL (clock_gettime, err, 2,
(cond->__data.__nwaiters
@@ -126,15 +125,6 @@ __pthread_cond_timedwait (pthread_cond_t *cond, pthread_mutex_t *mutex,
/* Convert the absolute timeout value to a relative timeout. */
rt.tv_sec = abstime->tv_sec - rt.tv_sec;
rt.tv_nsec = abstime->tv_nsec - rt.tv_nsec;
-# else
- /* Get the current time. So far we support only one clock. */
- struct timeval tv;
- (void) __gettimeofday (&tv, NULL);
-
- /* Convert the absolute timeout value to a relative timeout. */
- rt.tv_sec = abstime->tv_sec - tv.tv_sec;
- rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000;
-# endif
}
if (rt.tv_nsec < 0)
{
@@ -555,7 +555,6 @@ __pthread_cond_timedwait:
/* Get the current time. */
108: movl %ebx, %edx
-# ifdef __NR_clock_gettime
/* Get the clock number. */
movl cond_nwaiters(%ebx), %ebx
andl $((1 << nwaiters_shift) - 1), %ebx
@@ -571,23 +570,6 @@ __pthread_cond_timedwait:
movl 4(%ebp), %edx
subl 24(%esp), %ecx
subl 28(%esp), %edx
-# else
- /* Get the current time. */
- leal 24(%esp), %ebx
- xorl %ecx, %ecx
- movl $__NR_gettimeofday, %eax
- ENTER_KERNEL
- movl %edx, %ebx
-
- /* Compute relative timeout. */
- movl 28(%esp), %eax
- movl $1000, %edx
- mul %edx /* Milli seconds to nano seconds. */
- movl (%ebp), %ecx
- movl 4(%ebp), %edx
- subl 24(%esp), %ecx
- subl %eax, %edx
-# endif
jns 112f
addl $1000000000, %edx
subl $1, %ecx