2006-11-10 Carlos O'Donell <carlos@systemhalted.org>
authorCarlos O'Donell <carlos@systemhalted.org>
Sat, 11 Nov 2006 14:33:27 +0000 (14:33 +0000)
committerCarlos O'Donell <carlos@systemhalted.org>
Sat, 11 Nov 2006 14:33:27 +0000 (14:33 +0000)
* 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.

ChangeLog.hppa
sysdeps/hppa/nptl/pthread_spin_init.c [new file with mode: 0644]
sysdeps/hppa/nptl/pthread_spin_unlock.c
sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h

index 8d3132f..429c6c2 100644 (file)
@@ -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 (file)
index 0000000..95b9eb8
--- /dev/null
@@ -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;
+}
index 463d23c..4b1b2be 100644 (file)
    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)
index fc70758..328df54 100644 (file)
@@ -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.  */
index 2d3de3e..375f732 100644 (file)
@@ -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
+