From patchwork Tue Dec 29 22:31:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 10166 Received: (qmail 87636 invoked by alias); 29 Dec 2015 22:32:13 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 87522 invoked by uid 89); 29 Dec 2015 22:32:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.5 required=5.0 tests=AWL, BAYES_05, KAM_LAZY_DOMAIN_SECURITY, LOTS_OF_MONEY, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=1000000000, H*r:TLS1.2, edx, nano X-HELO: hall.aurel32.net From: Aurelien Jarno To: libc-alpha@sourceware.org Cc: Aurelien Jarno Subject: [PATCH] i386/pthread_cond_timedwait: always use clock_gettime Date: Tue, 29 Dec 2015 23:31:48 +0100 Message-Id: <1451428309-24160-2-git-send-email-aurelien@aurel32.net> Since we require at least a 2.6.32 Linux kernel, the clock_gettime syscall is always available. Remove the corresponding compatibility code. * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S [!__NR_clock_gettime] (__pthread_cond_timedwait): Remove compatibility code. --- ChangeLog | 6 ++++++ sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S | 18 ------------------ 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0fb5434..03556b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2015-12-29 Aurelien Jarno + * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S + [!__NR_clock_gettime] (__pthread_cond_timedwait): Remove + compatibility code. + +2015-12-29 Aurelien Jarno + * sysdeps/unix/sysv/linux/dl-openat64.c [!__NR_openat] (openat64): Remove compatibility code. diff --git a/sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S b/sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S index 130c090..cd8931a 100644 --- a/sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S +++ b/sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S @@ -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