From 6c477888caa491a3a296f5a8ef594cc4aa37b555 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 11 Mar 2003 19:40:00 +0000 Subject: [PATCH] Update. 2003-03-11 Martin Schwidefsky * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (__NR_pread64): Define to __NR_pread if not defined. (__NR_pwrite64): Define to __NR_pwrite if not defined. --- ChangeLog | 6 +++++ nptl/ChangeLog | 26 +++++++++++++++++++ .../sysv/linux/x86_64/pthread_barrier_wait.S | 6 ++--- .../linux/x86_64/pthread_cond_broadcast.S | 6 ++--- .../sysv/linux/x86_64/pthread_cond_signal.S | 6 ++--- .../sysv/linux/x86_64/pthread_cond_wait.S | 2 +- .../unix/sysv/linux/x86_64/pthread_once.S | 6 ++--- .../sysdeps/unix/sysv/linux/x86_64/sem_post.S | 2 +- .../unix/sysv/linux/x86_64/sem_timedwait.S | 4 +-- .../unix/sysv/linux/x86_64/sem_trywait.S | 2 +- .../sysdeps/unix/sysv/linux/x86_64/sem_wait.S | 2 +- sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h | 12 +++++++++ 12 files changed, 62 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index d2659db611..2fa3359cfb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-03-11 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (__NR_pread64): Define + to __NR_pread if not defined. + (__NR_pwrite64): Define to __NR_pwrite if not defined. + 2003-03-11 Jakub Jelinek * sysdeps/unix/sysv/linux/ia64/system.c: New file. diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 2a8e66dd81..be858950f9 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,5 +1,31 @@ +2003-03-11 Jakub Jelinek + + * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and + 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq. + + * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h. + * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise. + * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise. + * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise. + * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise. + * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise. + * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise. + 2003-03-11 Ulrich Drepper + * sysdeps/pthread/pthread_cond_timedwait.c + (__pthread_cond_timedwait): Return the result of the final + locking. If it succeeds, the regular function return value. + + * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): + Return result of the final locking. + * version.c (__nptl_main): Work around problems with the strange + INTERNAL_SYSCALL macro on ppc32. + * init.c (__pthread_initialize_minimal_internal): Unblock + SIGCANCEL in case the parent blocked it. + Reported by Paul Mackerras . + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file. * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file. * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file. diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S index c4ee4dbc08..036da43944 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S @@ -110,17 +110,17 @@ pthread_barrier_wait: retq 1: addq $MUTEX, %rdi - call __lll_lock_wait + callq __lll_lock_wait subq $MUTEX, %rdi jmp 2b 4: addq $MUTEX, %rdi - call __lll_unlock_wake + callq __lll_unlock_wake subq $MUTEX, %rdi jmp 5b 6: addq $MUTEX, %rdi - call __lll_unlock_wake + callq __lll_unlock_wake subq $MUTEX, %rdi jmp 7b .size pthread_barrier_wait,.-pthread_barrier_wait diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S index 6c28bc4751..cc12f5407c 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S @@ -88,7 +88,7 @@ __pthread_cond_broadcast: #if cond_lock != 0 addq $cond_lock, %rdi #endif - call __lll_mutex_lock_wait + callq __lll_mutex_lock_wait #if cond_lock != 0 subq $cond_lock, %rdi #endif @@ -96,12 +96,12 @@ __pthread_cond_broadcast: /* Unlock in loop requires waekup. */ 5: addq $cond_lock-wakeup_seq, %rdi - call __lll_mutex_unlock_wake + callq __lll_mutex_unlock_wake jmp 6b /* Unlock in loop requires waekup. */ 7: addq $cond_lock-wakeup_seq, %rdi - call __lll_mutex_unlock_wake + callq __lll_mutex_unlock_wake subq $cond_lock-wakeup_seq, %rdi jmp 8b .size __pthread_cond_broadcast, .-__pthread_cond_broadcast diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S index 0d3249a37a..64458628f5 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S @@ -78,15 +78,15 @@ __pthread_cond_signal: #if cond_lock != 0 addq $cond_lock, %rdi #endif - call __lll_mutex_lock_wait + callq __lll_mutex_lock_wait #if cond_lock != 0 subq $cond_lock, %rdi #endif jmp 2b /* Unlock in loop requires waekup. */ -5: addq $cond_lock-wakeup_seq, %rdi - call __lll_mutex_unlock_wake +5: addq $cond_lock-wakeup_seq, %rdi + callq __lll_mutex_unlock_wake jmp 6b .size __pthread_cond_signal, .-__pthread_cond_signal versioned_symbol (libpthread, __pthread_cond_signal, pthread_cond_signal, diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S index 385161eba2..060f35e8a9 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S @@ -228,7 +228,7 @@ __pthread_cond_wait: #if cond_lock != 0 addq $cond_lock, %rdi #endif - call __lll_mutex_lock_wait + callq __lll_mutex_lock_wait #if cond_lock != 0 subq $cond_lock, %rdi #endif diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S index 43eadcf40a..8db9d9413b 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S @@ -88,14 +88,14 @@ __pthread_once: leaq clear_once_control(%rip), %rsi movq %rdi, %rdx movq %rsp, %rdi - call __pthread_cleanup_push /* Note: no @PLT. */ + callq __pthread_cleanup_push /* Note: no @PLT. */ - call *40(%rsp) + callq *40(%rsp) /* Pop the cleanup handler. */ movq %rsp, %rdi xorq %rsi, %rsi - call __pthread_cleanup_pop /* Note: no @PLT. */ + callq __pthread_cleanup_pop /* Note: no @PLT. */ addq $32, %rsp diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S index 647aee8834..945de2d01e 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S @@ -58,7 +58,7 @@ __new_sem_post: movq errno@gottpoff(%rip), %rdx movl $EINVAL, %fs:(%rdx) #else - call __errno_location@plt + callq __errno_location@plt movl $EINVAL, (%rax) #endif diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S index 76d9fee3c6..afdec13e50 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S @@ -50,7 +50,7 @@ sem_timedwait: jne 2b xorl %eax, %eax - ret + retq /* Check whether the timeout value is valid. */ 1: subq $16, %rsp @@ -118,7 +118,7 @@ sem_timedwait: movl %eax, %fs:(%rdx) #else movl %eax, %edx - call __errno_location@plt + callq __errno_location@plt movl %edx, (%rax) #endif diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S index 001d68d63f..663868febb 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S @@ -55,7 +55,7 @@ __new_sem_trywait: movq errno@gottpoff(%rip), %rdx movl $EAGAIN, %fs:(%rdx) #else - call __errno_location@plt + callq __errno_location@plt movl $EAGAIN, (%rax) #endif orl $-1, %eax diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S index 82e63c07b1..d71e6b4100 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S @@ -65,7 +65,7 @@ __new_sem_wait: movl %eax, %fs:(%rdx) #else movl %eax, %edx - call __errno_location@plt + callq __errno_location@plt movl %edx, (%rax) #endif orl $-1, %eax diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h index 6de2dae288..f5a074ff6f 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h +++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h @@ -31,6 +31,18 @@ /* In newer 2.1 kernels __NR_syscall is missing so we define it here. */ #define __NR_syscall 0 +/* + * Newer kernel versions redefined __NR_pread and __NR_pwrite to + * __NR_pread64 and __NR_pwrite64. We use the new names but have + * to define them on our own for compiling against older kernels. + */ +#ifndef __NR_pread64 +# define __NR_pread64 __NR_pread +#endif +#ifndef __NR_pwrite64 +# define __NR_pwrite64 __NR_pwrite +#endif + #undef SYS_ify #define SYS_ify(syscall_name) __NR_##syscall_name