mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Update.
2003-03-19 Ulrich Drepper <drepper@redhat.com> * sysdeps/pthread/Makefile: Fix cut&paste error.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2003-03-19 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/pthread/Makefile: Fix cut&paste error.
|
||||||
|
|
||||||
2003-03-18 Roland McGrath <roland@redhat.com>
|
2003-03-18 Roland McGrath <roland@redhat.com>
|
||||||
|
|
||||||
* Versions (libpthread: GLIBC_2.2): Remove
|
* Versions (libpthread: GLIBC_2.2): Remove
|
||||||
|
@ -9,5 +9,5 @@ endif
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(subdir),posix)
|
ifeq ($(subdir),posix)
|
||||||
CFLAGS-confstr.c += -DLIBPTHREAD_VERSION="\"$(shell sed 's/\(.*\) by .*/\1/' ../nptl/Banner)\""
|
CFLAGS-confstr.c += -DLIBPTHREAD_VERSION="\"$(shell sed 's/\(.*\) by .*/\1/' ../linuxthreads/Banner)\""
|
||||||
endif
|
endif
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
2003-03-19 Ulrich Drepper <drepper@redhat.com>
|
2003-03-19 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
|
||||||
|
support for clock selection.
|
||||||
|
|
||||||
* sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
|
* sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
|
||||||
signalling waiters.
|
signalling waiters.
|
||||||
|
|
||||||
|
@ -120,6 +120,27 @@ __pthread_cond_timedwait:
|
|||||||
callq __pthread_enable_asynccancel_2
|
callq __pthread_enable_asynccancel_2
|
||||||
|
|
||||||
/* Get the current time. */
|
/* Get the current time. */
|
||||||
|
#ifdef __NR_clock_gettime
|
||||||
|
/* Get the clock number. Note that the field in the condvar
|
||||||
|
structure stores the number minus 1. */
|
||||||
|
movq 8(%rsp), %rdi
|
||||||
|
movl cond_clock(%rdi), %edi
|
||||||
|
/* Only clocks 0 and 1 are allowed. Both are handled in the
|
||||||
|
kernel. */
|
||||||
|
leaq 24(%rsp), %rsi
|
||||||
|
movq $__NR_clock_gettime, %rax
|
||||||
|
syscall
|
||||||
|
# ifndef __ASSUME_POSIX_TIMERS
|
||||||
|
cmpq $-ENOSYS, %rax
|
||||||
|
je 19f
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* Compute relative timeout. */
|
||||||
|
movq (%r13), %rcx
|
||||||
|
movq 8(%r13), %rdx
|
||||||
|
subq 24(%rsp), %rcx
|
||||||
|
subq 32(%rsp), %rdx
|
||||||
|
#else
|
||||||
leaq 24(%rsp), %rdi
|
leaq 24(%rsp), %rdi
|
||||||
xorq %rsi, %rsi
|
xorq %rsi, %rsi
|
||||||
movq $VSYSCALL_ADDR_vgettimeofday, %rax
|
movq $VSYSCALL_ADDR_vgettimeofday, %rax
|
||||||
@ -133,17 +154,18 @@ __pthread_cond_timedwait:
|
|||||||
movq 8(%r13), %rdx
|
movq 8(%r13), %rdx
|
||||||
subq 24(%rsp), %rcx
|
subq 24(%rsp), %rcx
|
||||||
subq %rax, %rdx
|
subq %rax, %rdx
|
||||||
|
#endif
|
||||||
jns 12f
|
jns 12f
|
||||||
addq $1000000000, %rdx
|
addq $1000000000, %rdx
|
||||||
decq %rcx
|
decq %rcx
|
||||||
12: testq %rcx, %rcx
|
12: testq %rcx, %rcx
|
||||||
|
movq 8(%rsp), %rdi
|
||||||
js 13f
|
js 13f
|
||||||
|
|
||||||
/* Store relative timeout. */
|
/* Store relative timeout. */
|
||||||
movq %rcx, 24(%rsp)
|
21: movq %rcx, 24(%rsp)
|
||||||
movq %rdx, 32(%rsp)
|
movq %rdx, 32(%rsp)
|
||||||
|
|
||||||
movq 8(%rsp), %rdi
|
|
||||||
leaq 24(%rsp), %r10
|
leaq 24(%rsp), %r10
|
||||||
xorq %rsi, %rsi /* movq $FUTEX_WAIT, %rsi */
|
xorq %rsi, %rsi /* movq $FUTEX_WAIT, %rsi */
|
||||||
movq %r12, %rdx
|
movq %r12, %rdx
|
||||||
@ -265,6 +287,30 @@ __pthread_cond_timedwait:
|
|||||||
|
|
||||||
17: movq (%rsp), %rax
|
17: movq (%rsp), %rax
|
||||||
jmp 18b
|
jmp 18b
|
||||||
|
|
||||||
|
#if defined __NR_clock_gettime && !defined __ASSUME_POSIX_TIMERS
|
||||||
|
/* clock_gettime not available. */
|
||||||
|
19: leaq 24(%rsp), %rdi
|
||||||
|
xorq %rsi, %rsi
|
||||||
|
movq $VSYSCALL_ADDR_vgettimeofday, %rax
|
||||||
|
callq *%rax
|
||||||
|
|
||||||
|
/* Compute relative timeout. */
|
||||||
|
movq 32(%rsp), %rax
|
||||||
|
movq $1000, %rdx
|
||||||
|
mul %rdx /* Milli seconds to nano seconds. */
|
||||||
|
movq (%r13), %rcx
|
||||||
|
movq 8(%r13), %rdx
|
||||||
|
subq 24(%rsp), %rcx
|
||||||
|
subq %rax, %rdx
|
||||||
|
jns 20f
|
||||||
|
addq $1000000000, %rdx
|
||||||
|
decq %rcx
|
||||||
|
20: testq %rcx, %rcx
|
||||||
|
movq 8(%rsp), %rdi
|
||||||
|
js 13b
|
||||||
|
jmp 21b
|
||||||
|
#endif
|
||||||
.size __pthread_cond_timedwait, .-__pthread_cond_timedwait
|
.size __pthread_cond_timedwait, .-__pthread_cond_timedwait
|
||||||
versioned_symbol (libpthread, __pthread_cond_timedwait, pthread_cond_timedwait,
|
versioned_symbol (libpthread, __pthread_cond_timedwait, pthread_cond_timedwait,
|
||||||
GLIBC_2_3_2)
|
GLIBC_2_3_2)
|
||||||
|
Reference in New Issue
Block a user