This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Remove hppa from linuxthreads.


Dan,

This patch removes the hppa pieces from linuxthreads.
They have already been checked into ports.

Please apply.

Cheers,
Carlos.

2006-04-19  Carlos O'Donell  <carlos@systemhalted.org>

	* sysdeps/hppa/pspinlock.c: Removed.
	* sysdeps/hppa/pt-machine.h: Likewise
	* sysdeps/unix/sysv/linux/hppa/aio_cancel.c: Likewise.
	* sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
	* sysdeps/unix/sysv/linux/hppa/malloc-machine.h: Likewise.
	* sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
	* sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: Likewise.
	* sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
Index: ChangeLog
===================================================================
RCS file: /cvs/glibc/linuxthreads/linuxthreads/ChangeLog,v
retrieving revision 1.866
diff -u -p -r1.866 ChangeLog
--- ChangeLog	3 Mar 2006 18:20:48 -0000	1.866
+++ ChangeLog	19 Apr 2006 05:54:10 -0000
@@ -1,3 +1,14 @@
+2006-04-19  Carlos O'Donell  <carlos@systemhalted.org>
+
+	* sysdeps/hppa/pspinlock.c: Removed. 
+	* sysdeps/hppa/pt-machine.h: Likewise
+	* sysdeps/unix/sysv/linux/hppa/aio_cancel.c: Likewise.
+	* sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
+	* sysdeps/unix/sysv/linux/hppa/malloc-machine.h: Likewise.
+	* sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
+	* sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: Likewise.
+	* sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
+
 2006-03-02  Petr Salinger  <Petr.Salinger@seznam.cz>
 
 	* sysdeps/pthread/bits/libc-tsd.h: Use #include_next.
Index: sysdeps/hppa/pspinlock.c
===================================================================
RCS file: sysdeps/hppa/pspinlock.c
diff -N sysdeps/hppa/pspinlock.c
--- sysdeps/hppa/pspinlock.c	26 Aug 2002 22:39:51 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,81 +0,0 @@
-/* POSIX spinlock implementation.  hppa version.
-   Copyright (C) 2000 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; see the file COPYING.LIB.  If not,
-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-#include <errno.h>
-#include <pthread.h>
-#include "internals.h"
-
-int
-__pthread_spin_lock (pthread_spinlock_t *lock)
-{
-  unsigned int val;
-
-  do
-    asm volatile ("ldcw %1,%0"
-		  : "=r" (val), "=m" (*lock)
-		  : "m" (*lock));
-  while (!val);
-
-  return 0;
-}
-weak_alias (__pthread_spin_lock, pthread_spin_lock)
-
-
-int
-__pthread_spin_trylock (pthread_spinlock_t *lock)
-{
-  unsigned int val;
-
-  asm volatile ("ldcw %1,%0"
-		: "=r" (val), "=m" (*lock)
-		: "m" (*lock));
-
-  return val ? 0 : EBUSY;
-}
-weak_alias (__pthread_spin_trylock, pthread_spin_trylock)
-
-
-int
-__pthread_spin_unlock (pthread_spinlock_t *lock)
-{
-  *lock = 1;
-  return 0;
-}
-weak_alias (__pthread_spin_unlock, pthread_spin_unlock)
-
-
-int
-__pthread_spin_init (pthread_spinlock_t *lock, int pshared)
-{
-  /* We can ignore the `pshared' parameter.  Since we are busy-waiting
-     all processes which can access the memory location `lock' points
-     to can use the spinlock.  */
-  *lock = 1;
-  return 0;
-}
-weak_alias (__pthread_spin_init, pthread_spin_init)
-
-
-int
-__pthread_spin_destroy (pthread_spinlock_t *lock)
-{
-  /* Nothing to do.  */
-  return 0;
-}
-weak_alias (__pthread_spin_destroy, pthread_spin_destroy)
Index: sysdeps/hppa/pt-machine.h
===================================================================
RCS file: sysdeps/hppa/pt-machine.h
diff -N sysdeps/hppa/pt-machine.h
--- sysdeps/hppa/pt-machine.h	31 Jul 2003 19:15:42 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,62 +0,0 @@
-/* Machine-dependent pthreads configuration and inline functions.
-   hppa version.
-   Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Richard Henderson <rth@tamu.edu>.
-
-   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; see the file COPYING.LIB.  If not,
-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-#ifndef _PT_MACHINE_H
-#define _PT_MACHINE_H   1
-
-#include <bits/initspin.h>
-
-#ifndef PT_EI
-# define PT_EI extern inline __attribute__ ((always_inline))
-#endif
-
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
-/* Get some notion of the current stack.  Need not be exactly the top
-   of the stack, just something somewhere in the current frame.  */
-#define CURRENT_STACK_FRAME  stack_pointer
-register char * stack_pointer __asm__ ("%r30");
-
-
-/* The hppa only has one atomic read and modify memory operation,
-   load and clear, so hppa spinlocks must use zero to signify that
-   someone is holding the lock.  */
-
-#define xstr(s) str(s)
-#define str(s) #s
-/* Spinlock implementation; required.  */
-PT_EI long int
-testandset (int *spinlock)
-{
-  int ret;
-
-  __asm__ __volatile__(
-       "ldcw 0(%2),%0"
-       : "=r"(ret), "=m"(*spinlock)
-       : "r"(spinlock));
-
-  return ret == 0;
-}
-#undef str
-#undef xstr
-
-#endif /* pt-machine.h */
Index: sysdeps/unix/sysv/linux/hppa/aio_cancel.c
===================================================================
RCS file: sysdeps/unix/sysv/linux/hppa/aio_cancel.c
diff -N sysdeps/unix/sysv/linux/hppa/aio_cancel.c
--- sysdeps/unix/sysv/linux/hppa/aio_cancel.c	29 Aug 2002 00:01:33 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
-#include <shlib-compat.h>
-
-#define aio_cancel64 XXX
-#include <aio.h>
-#undef aio_cancel64
-#include <errno.h>
-
-extern __typeof (aio_cancel) __new_aio_cancel;
-extern __typeof (aio_cancel) __old_aio_cancel;
-
-#define aio_cancel	__new_aio_cancel
-
-#include <sysdeps/pthread/aio_cancel.c>
-
-#undef aio_cancel
-strong_alias (__new_aio_cancel, __new_aio_cancel64);
-versioned_symbol (librt, __new_aio_cancel, aio_cancel, GLIBC_2_3);
-versioned_symbol (librt, __new_aio_cancel64, aio_cancel64, GLIBC_2_3);
-
-#if SHLIB_COMPAT (librt, GLIBC_2_1, GLIBC_2_3)
-
-#undef ECANCELED
-#define aio_cancel	__old_aio_cancel
-#define ECANCELED	125
-
-#include <sysdeps/pthread/aio_cancel.c>
-
-#undef aio_cancel
-strong_alias (__old_aio_cancel, __old_aio_cancel64);
-compat_symbol (librt, __old_aio_cancel, aio_cancel, GLIBC_2_1);
-compat_symbol (librt, __old_aio_cancel64, aio_cancel64, GLIBC_2_1);
-
-#endif
Index: sysdeps/unix/sysv/linux/hppa/malloc-machine.h
===================================================================
RCS file: sysdeps/unix/sysv/linux/hppa/malloc-machine.h
diff -N sysdeps/unix/sysv/linux/hppa/malloc-machine.h
--- sysdeps/unix/sysv/linux/hppa/malloc-machine.h	15 Oct 2003 04:40:10 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,73 +0,0 @@
-/* HP-PARISC macro definitions for mutexes, thread-specific data 
-   and parameters for malloc.
-   Copyright (C) 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Carlos O'Donell <carlos@baldric.uwo.ca>, 2003.
-   
-   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.  */
-
-#ifndef _MALLOC_MACHINE_H
-#define _MALLOC_MACHINE_H
-
-#undef thread_atfork_static
-
-#include <atomic.h>
-#include <bits/libc-lock.h>
-
-__libc_lock_define (typedef, mutex_t)
-
-/* Since our lock structure does not tolerate being initialized to zero, we must
-   modify the standard function calls made by malloc */
-#  define mutex_init(m)		\
-	__libc_maybe_call (__pthread_mutex_init, (m, NULL), \
-		(((m)->__m_lock.__spinlock = __LT_SPINLOCK_INIT),(*(int *)(m))) )
-#  define mutex_lock(m)		\
-	__libc_maybe_call (__pthread_mutex_lock, (m), \
-			(__load_and_clear(&((m)->__m_lock.__spinlock)), 0))
-#  define mutex_trylock(m)	\
-	__libc_maybe_call (__pthread_mutex_trylock, (m), \
-			(*(int *)(m) ? 1 : (__load_and_clear(&((m)->__m_lock.__spinlock)), 0)))
-#  define mutex_unlock(m)	\
-	__libc_maybe_call (__pthread_mutex_unlock, (m), \
-			(((m)->__m_lock.__spinlock = __LT_SPINLOCK_INIT), (*(int *)(m))) )
-	
-/* This is defined by newer gcc version unique for each module.  */
-extern void *__dso_handle __attribute__ ((__weak__));
-
-#include <fork.h>
-
-#ifdef SHARED
-# define thread_atfork(prepare, parent, child) \
-   __register_atfork (prepare, parent, child, __dso_handle)
-#else
-# define thread_atfork(prepare, parent, child) \
-   __register_atfork (prepare, parent, child,				      \
-		      &__dso_handle == NULL ? NULL : __dso_handle)
-#endif
-
-/* thread specific data for glibc */
-
-#include <bits/libc-tsd.h>
-
-typedef int tsd_key_t[1];	/* no key data structure, libc magic does it */
-__libc_tsd_define (static, MALLOC)	/* declaration/common definition */
-#define tsd_key_create(key, destr)	((void) (key))
-#define tsd_setspecific(key, data)	__libc_tsd_set (MALLOC, (data))
-#define tsd_getspecific(key, vptr)	((vptr) = __libc_tsd_get (MALLOC))
-
-#include <sysdeps/generic/malloc-machine.h>
-
-#endif /* !defined(_MALLOC_MACHINE_H) */
Index: sysdeps/unix/sysv/linux/hppa/pt-initfini.c
===================================================================
RCS file: sysdeps/unix/sysv/linux/hppa/pt-initfini.c
diff -N sysdeps/unix/sysv/linux/hppa/pt-initfini.c
--- sysdeps/unix/sysv/linux/hppa/pt-initfini.c	4 Feb 2003 07:35:42 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,109 +0,0 @@
-/* Special .init and .fini section support for HPPA.  Linuxthreads version.
-   Copyright (C) 2001, 2003 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.
-
-   In addition to the permissions in the GNU Lesser General Public
-   License, the Free Software Foundation gives you unlimited
-   permission to link the compiled version of this file with other
-   programs, and to distribute those programs without any restriction
-   coming from the use of this file.  (The Lesser General Public
-   License restrictions do apply in other respects; for example, they
-   cover modification of the file, and distribution when not linked
-   into another program.)
-
-   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; see the file COPYING.LIB.  If not,
-   write to the Free Software Foundation, 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-/* This file is compiled into assembly code which is then munged by a sed
-   script into two files: crti.s and crtn.s.
-
-   * crti.s puts a function prologue at the beginning of the
-   .init and .fini sections and defines global symbols for
-   those addresses, so they can be called as functions.
-
-   * crtn.s puts the corresponding function epilogues
-   in the .init and .fini sections. */
-
-/* If we use the standard C version, the linkage table pointer won't
-   be properly preserved due to the splitting up of function prologues
-   and epilogues.  Therefore we write these in assembly to make sure
-   they do the right thing.  */
-
-__asm__ (
-"#include \"defs.h\"\n"
-"\n"
-"/*@HEADER_ENDS*/\n"
-"\n"
-"/*@_init_PROLOG_BEGINS*/\n"
-"	.section .init\n"
-"	.align 4\n"
-"	.globl _init\n"
-"	.type _init,@function\n"
-"_init:\n"
-"	stw	%rp,-20(%sp)\n"
-"	stwm	%r4,64(%sp)\n"
-"	stw	%r19,-32(%sp)\n"
-"	bl	__pthread_initialize_minimal,%rp\n"
-"	copy	%r19,%r4	/* delay slot */\n"
-"	copy	%r4,%r19\n"
-"/*@_init_PROLOG_ENDS*/\n"
-"\n"
-"/*@_init_EPILOG_BEGINS*/\n"
-"/* Here is the tail end of _init.  */\n"
-"	.section .init\n"
-"	ldw	-84(%sp),%rp\n"
-"	copy	%r4,%r19\n"
-"	bv	%r0(%rp)\n"
-"_end_init:\n"
-"	ldwm	-64(%sp),%r4\n"
-"\n"
-"/* Our very own unwind info, because the assembler can't handle\n"
-"   functions split into two or more pieces.  */\n"
-"	.section .PARISC.unwind,\"a\",@progbits\n"
-"	.extern _init\n"
-"	.word	_init, _end_init\n"
-"	.byte	0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n"
-"\n"
-"/*@_init_EPILOG_ENDS*/\n"
-"\n"
-"/*@_fini_PROLOG_BEGINS*/\n"
-"	.section .fini\n"
-"	.align 4\n"
-"	.globl _fini\n"
-"	.type _fini,@function\n"
-"_fini:\n"
-"	stw	%rp,-20(%sp)\n"
-"	stwm	%r4,64(%sp)\n"
-"	stw	%r19,-32(%sp)\n"
-"	copy	%r19,%r4\n"
-"/*@_fini_PROLOG_ENDS*/\n"
-"\n"
-"/*@_fini_EPILOG_BEGINS*/\n"
-"	.section .fini\n"
-"	ldw	-84(%sp),%rp\n"
-"	copy	%r4,%r19\n"
-"	bv	%r0(%rp)\n"
-"_end_fini:\n"
-"	ldwm	-64(%sp),%r4\n"
-"\n"
-"	.section .PARISC.unwind,\"a\",@progbits\n"
-"	.extern _fini\n"
-"	.word	_fini, _end_fini\n"
-"	.byte	0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n"
-"\n"
-"/*@_fini_EPILOG_ENDS*/\n"
-"\n"
-"/*@TRAILER_BEGINS*/\n"
-);
Index: sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h
===================================================================
RCS file: sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h
diff -N sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h
--- sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h	11 Oct 2003 01:28:08 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,189 +0,0 @@
-/* cancellable system calls for Linux/HPPA.
-   Copyright (C) 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Carlos O'Donell <carlos@baldric.uwo.ca>, 2003.
-
-   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 <sysdep.h>
-#ifndef __ASSEMBLER__
-# include <linuxthreads/internals.h>
-#endif
-
-#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
-
-# ifndef NO_ERROR
-#  define NO_ERROR -0x1000
-# endif
-
-# undef PSEUDO
-# define PSEUDO(name, syscall_name, args)				\
-  ENTRY (name)								\
-    SINGLE_THREAD_P					ASM_LINE_SEP	\
-    cmpib,<> 0,%ret0,Lpseudo_cancel			ASM_LINE_SEP	\
-    nop							ASM_LINE_SEP	\
-    DO_CALL(syscall_name, args)				ASM_LINE_SEP	\
-    /* DONE! */						ASM_LINE_SEP	\
-    bv 0(2)						ASM_LINE_SEP	\
-    nop							ASM_LINE_SEP	\
-  Lpseudo_cancel:					ASM_LINE_SEP	\
-    /* store return ptr */				ASM_LINE_SEP	\
-    stw %rp, -20(%sr0,%sp)				ASM_LINE_SEP	\
-    /* save syscall args */				ASM_LINE_SEP	\
-    PUSHARGS_##args /* MACRO */				ASM_LINE_SEP	\
-    STW_PIC						ASM_LINE_SEP	\
-    CENABLE /* FUNC CALL */				ASM_LINE_SEP	\
-    ldo 64(%sp), %sp					ASM_LINE_SEP	\
-    ldo -64(%sp), %sp					ASM_LINE_SEP	\
-    LDW_PIC						ASM_LINE_SEP	\
-    /* restore syscall args */				ASM_LINE_SEP	\
-    POPARGS_##args					ASM_LINE_SEP	\
-    /* save r4 in arg0 stack slot */			ASM_LINE_SEP	\
-    stw %r4, -36(%sr0,%sp)				ASM_LINE_SEP	\
-    /* save mask from cenable */			ASM_LINE_SEP	\
-    copy %ret0, %r4					ASM_LINE_SEP	\
-    ble 0x100(%sr2,%r0)					ASM_LINE_SEP    \
-    ldi SYS_ify (syscall_name), %r20			ASM_LINE_SEP	\
-    LDW_PIC						ASM_LINE_SEP	\
-    /* pass mask as arg0 to cdisable */			ASM_LINE_SEP	\
-    copy %r4, %r26					ASM_LINE_SEP	\
-    copy %ret0, %r4					ASM_LINE_SEP	\
-    CDISABLE						ASM_LINE_SEP	\
-    ldo 64(%sp), %sp					ASM_LINE_SEP	\
-    ldo -64(%sp), %sp					ASM_LINE_SEP	\
-    LDW_PIC						ASM_LINE_SEP	\
-    /* compare error */					ASM_LINE_SEP	\
-    ldi NO_ERROR,%r1					ASM_LINE_SEP	\
-    /* branch if no error */				ASM_LINE_SEP	\
-    cmpb,>>=,n %r1,%r4,Lpre_end				ASM_LINE_SEP	\
-    nop							ASM_LINE_SEP	\
-    SYSCALL_ERROR_HANDLER				ASM_LINE_SEP	\
-    ldo 64(%sp), %sp					ASM_LINE_SEP	\
-    ldo -64(%sp), %sp					ASM_LINE_SEP	\
-    /* No need to LDW_PIC */				ASM_LINE_SEP	\
-    /* make syscall res value positive */		ASM_LINE_SEP	\
-    sub %r0, %r4, %r4					ASM_LINE_SEP	\
-    /* store into errno location */			ASM_LINE_SEP	\
-    stw %r4, 0(%sr0,%ret0)				ASM_LINE_SEP	\
-    /* return -1 */					ASM_LINE_SEP	\
-    ldo -1(%r0), %ret0					ASM_LINE_SEP	\
-  Lpre_end:						ASM_LINE_SEP	\
-    ldw -20(%sr0,%sp), %rp             			ASM_LINE_SEP	\
-    /* No need to LDW_PIC */				ASM_LINE_SEP	\
-    ldw -36(%sr0,%sp), %r4				ASM_LINE_SEP
-
-/* Save arguments into our frame */
-# define PUSHARGS_0	/* nothing to do */
-# define PUSHARGS_1	PUSHARGS_0 stw %r26, -36(%sr0,%sp)	ASM_LINE_SEP
-# define PUSHARGS_2	PUSHARGS_1 stw %r25, -40(%sr0,%sp)	ASM_LINE_SEP
-# define PUSHARGS_3	PUSHARGS_2 stw %r24, -44(%sr0,%sp)	ASM_LINE_SEP
-# define PUSHARGS_4	PUSHARGS_3 stw %r23, -48(%sr0,%sp)	ASM_LINE_SEP
-# define PUSHARGS_5	PUSHARGS_4 /* Args are on the stack... */
-# define PUSHARGS_6	PUSHARGS_5
-
-/* Bring them back from the stack */
-# define POPARGS_0	/* nothing to do */
-# define POPARGS_1	POPARGS_0 ldw -36(%sr0,%sp), %r26	ASM_LINE_SEP
-# define POPARGS_2	POPARGS_1 ldw -40(%sr0,%sp), %r25	ASM_LINE_SEP
-# define POPARGS_3	POPARGS_2 ldw -44(%sr0,%sp), %r24	ASM_LINE_SEP
-# define POPARGS_4	POPARGS_3 ldw -48(%sr0,%sp), %r23	ASM_LINE_SEP
-# define POPARGS_5	POPARGS_4 ldw -52(%sr0,%sp), %r22	ASM_LINE_SEP
-# define POPARGS_6	POPARGS_5 ldw -54(%sr0,%sp), %r21	ASM_LINE_SEP
-
-# ifdef IS_IN_libpthread
-#  ifdef PIC
-#   define CENABLE .import __pthread_enable_asynccancel,code ASM_LINE_SEP \
-			bl __pthread_enable_asynccancel,%r2 ASM_LINE_SEP
-#   define CDISABLE .import __pthread_disable_asynccancel,code ASM_LINE_SEP \
-			bl __pthread_disable_asynccancel,%r2 ASM_LINE_SEP
-#  else
-#   define CENABLE .import __pthread_enable_asynccancel,code ASM_LINE_SEP \
-			bl __pthread_enable_asynccancel,%r2 ASM_LINE_SEP
-#   define CDISABLE .import __pthread_disable_asynccancel,code ASM_LINE_SEP \
-			bl __pthread_disable_asynccancel,%r2 ASM_LINE_SEP
-#  endif
-# elif !defined NOT_IN_libc
-#  ifdef PIC
-#   define CENABLE .import __libc_enable_asynccancel,code ASM_LINE_SEP \
-			bl __libc_enable_asynccancel,%r2 ASM_LINE_SEP
-#   define CDISABLE	.import __libc_disable_asynccancel,code ASM_LINE_SEP \
-			bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP
-#  else
-#   define CENABLE .import __libc_enable_asynccancel,code ASM_LINE_SEP \
-			bl __libc_enable_asynccancel,%r2 ASM_LINE_SEP
-#   define CDISABLE	.import __libc_disable_asynccancel,code ASM_LINE_SEP \
-			bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP
-#  endif
-# else
-#  ifdef PIC
-#   define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \
-			bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP
-#   define CDISABLE .import __librt_disable_asynccancel,code ASM_LINE_SEP \
-			bl __librt_disable_asynccancel,%r2 ASM_LINE_SEP
-#  else
-#   define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \
-			bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP
-#   define CDISABLE .import __librt_disable_asynccancel,code ASM_LINE_SEP \
-			bl __librt_disable_asynccancel,%r2 ASM_LINE_SEP
-#  endif
-# endif
-
-/* p_header.multiple_threads is +12 from the pthread_descr struct start,
-   We could have called __get_cr27() but we really want less overhead */
-# define MULTIPLE_THREADS_OFFSET 0xC
-
-/* cr27 has been initialized to 0x0 by kernel */
-# define NO_THREAD_CR27 0x0
-
-# ifdef IS_IN_libpthread
-#  define __local_multiple_threads __pthread_multiple_threads
-# elif !defined NOT_IN_libc
-#  define __local_multiple_threads __libc_multiple_threads
-# else
-#  define __local_multiple_threads __librt_multiple_threads
-# endif
-
-# ifndef __ASSEMBLER__
- extern int __local_multiple_threads attribute_hidden;
-#  define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
-# else
-/* This ALT version requires newer kernel support */
-#  define SINGLE_THREAD_P_MFCTL						\
-	mfctl %cr27, %ret0					ASM_LINE_SEP	\
-	cmpib,= NO_THREAD_CR27,%ret0,Lstp			ASM_LINE_SEP	\
-	nop							ASM_LINE_SEP	\
-	ldw MULTIPLE_THREADS_OFFSET(%sr0,%ret0),%ret0		ASM_LINE_SEP	\
- Lstp:								ASM_LINE_SEP
-#  ifdef PIC
-/* Slower version uses GOT to get value of __local_multiple_threads */
-#   define SINGLE_THREAD_P							\
-	addil LT%__local_multiple_threads, %r19			ASM_LINE_SEP	\
-	ldw RT%__local_multiple_threads(%sr0,%r1), %ret0	ASM_LINE_SEP	\
-	ldw 0(%sr0,%ret0), %ret0 				ASM_LINE_SEP
-#  else
-  /* Slow non-pic version using DP */
-#   define SINGLE_THREAD_P								\
-	addil LR%__local_multiple_threads-$global$,%r27  		ASM_LINE_SEP	\
-	ldw RR%__local_multiple_threads-$global$(%sr0,%r1),%ret0	ASM_LINE_SEP
-#  endif
-# endif
-#elif !defined __ASSEMBLER__
-
-/* This code should never be used but we define it anyhow.  */
-# define SINGLE_THREAD_P (1)
-
-#endif
-/* !defined NOT_IN_libc || defined IS_IN_libpthread */
Index: sysdeps/unix/sysv/linux/hppa/bits/initspin.h
===================================================================
RCS file: sysdeps/unix/sysv/linux/hppa/bits/initspin.h
diff -N sysdeps/unix/sysv/linux/hppa/bits/initspin.h
--- sysdeps/unix/sysv/linux/hppa/bits/initspin.h	26 Aug 2002 22:39:55 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,27 +0,0 @@
-/* PA-RISC specific definitions for spinlock initializers.
-   Copyright (C) 2000, 2001 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; see the file COPYING.LIB.  If not,
-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-/* Initial value of a spinlock.  PA-RISC only implements atomic load
-   and clear so this must be non-zero. */
-#define __LT_SPINLOCK_INIT 1
-
-/* Macros for lock initializers, using the above definition. */
-#define __LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT }
-#define __ALT_LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT }
-#define __ATOMIC_INITIALIZER { 0, __LT_SPINLOCK_INIT }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]