diff options
| author | Carlos O'Donell <carlos@systemhalted.org> | 2006-11-11 14:33:27 +0000 |
|---|---|---|
| committer | Carlos O'Donell <carlos@systemhalted.org> | 2006-11-11 14:33:27 +0000 |
| commit | d396ccd5ec2c37a162608ad64bbf6319aac9da2e (patch) | |
| tree | e8f9d5b58036685ed0ea0874309c70d40316c2a9 | |
| parent | 3ed8d993f9ff5a68606a4c20d87e70f981fc227c (diff) | |
| download | glibc-d396ccd5ec2c37a162608ad64bbf6319aac9da2e.tar.xz glibc-d396ccd5ec2c37a162608ad64bbf6319aac9da2e.zip | |
2006-11-10 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/nptl/pthread_spin_init.c: New file.
* sysdeps/hppa/nptl/pthread_spin_unlock.c: Remove strong alias
to pthread_spin_init.
* sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Define
RTLD_SINGLE_THREAD_P.
2006-09-20 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (splice): Add offin
and offout arguments to the prototype.
| -rw-r--r-- | ChangeLog.hppa | 13 | ||||
| -rw-r--r-- | sysdeps/hppa/nptl/pthread_spin_init.c | 29 | ||||
| -rw-r--r-- | sysdeps/hppa/nptl/pthread_spin_unlock.c | 7 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 3 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h | 9 |
5 files changed, 52 insertions, 9 deletions
diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 8d3132f949..429c6c2a31 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,16 @@ +2006-11-10 Carlos O'Donell <carlos@systemhalted.org> + + * sysdeps/hppa/nptl/pthread_spin_init.c: New file. + * sysdeps/hppa/nptl/pthread_spin_unlock.c: Remove strong alias + to pthread_spin_init. + * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Define + RTLD_SINGLE_THREAD_P. + +2006-09-20 Carlos O'Donell <carlos@systemhalted.org> + + * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (splice): Add offin + and offout arguments to the prototype. + 2006-09-15 Carlos O'Donell <carlos@systemhalted.org> * sysdeps/hppa/nptl/tcb-offsets.sym: Define TID_THREAD_OFFSET. diff --git a/sysdeps/hppa/nptl/pthread_spin_init.c b/sysdeps/hppa/nptl/pthread_spin_init.c new file mode 100644 index 0000000000..95b9eb8aab --- /dev/null +++ b/sysdeps/hppa/nptl/pthread_spin_init.c @@ -0,0 +1,29 @@ +/* Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include "pthreadP.h" + +int +pthread_spin_init (pthread_spinlock_t *lock, int pshared) +{ + int tmp = 0; + /* This should be a memory barrier to newer compilers */ + __asm__ __volatile__ ("stw,ma %1,0(%0)" + : : "r" (lock), "r" (tmp) : "memory"); + return 0; +} diff --git a/sysdeps/hppa/nptl/pthread_spin_unlock.c b/sysdeps/hppa/nptl/pthread_spin_unlock.c index 463d23c97f..4b1b2beb62 100644 --- a/sysdeps/hppa/nptl/pthread_spin_unlock.c +++ b/sysdeps/hppa/nptl/pthread_spin_unlock.c @@ -16,21 +16,14 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -/* Ugly hack to avoid the declaration of pthread_spin_init. */ -#define pthread_spin_init pthread_spin_init_XXX #include "pthreadP.h" -#undef pthread_spin_init int pthread_spin_unlock (pthread_spinlock_t *lock) { -#if 0 - volatile unsigned int *a = __ldcw_align (lock); -#endif int tmp = 0; /* This should be a memory barrier to newer compilers */ __asm__ __volatile__ ("stw,ma %1,0(%0)" : : "r" (lock), "r" (tmp) : "memory"); return 0; } -strong_alias (pthread_spin_unlock, pthread_spin_init) diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h index fc7075841b..328df54a33 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h @@ -210,7 +210,8 @@ extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, unsigned int __flags); /* Splice two files together. */ -extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags) +extern int splice (int __fdin, __off64_t *offin, int __fdout, + __off64_t *__offout, size_t __len, unsigned int __flags) __THROW; /* In-kernel implementation of tee for pipe buffers. */ diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h index 2d3de3efed..375f7324d9 100644 --- a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h @@ -212,4 +212,11 @@ L(pre_end): ASM_LINE_SEP \ # define NO_CANCELLATION 1 #endif -/* !defined NOT_IN_libc || defined IS_IN_libpthread */ +/* !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt */ + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif + |
