From: Carlos O'Donell Date: Sat, 11 Nov 2006 14:33:27 +0000 (+0000) Subject: 2006-11-10 Carlos O'Donell X-Git-Tag: glibc-2.16-ports-before-merge~806 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d396ccd5ec2c37a162608ad64bbf6319aac9da2e;p=thirdparty%2Fglibc.git 2006-11-10 Carlos O'Donell * 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 * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (splice): Add offin and offout arguments to the prototype. --- diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 8d3132f9497..429c6c2a314 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,16 @@ +2006-11-10 Carlos O'Donell + + * 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 + + * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (splice): Add offin + and offout arguments to the prototype. + 2006-09-15 Carlos O'Donell * 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 00000000000..95b9eb8aab8 --- /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 463d23c97f5..4b1b2beb62f 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 fc7075841b1..328df54a337 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 2d3de3efedb..375f7324d94 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 +