summaryrefslogtreecommitdiffstats
path: root/libpthread/nptl/sysdeps/pthread
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2005-11-16 02:49:53 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2005-11-16 02:49:53 +0000
commitf9df27a905a3a067ccec2bc23d4c1f1e6db9000c (patch)
tree008e632e06826be196b9702ce9f47d3096a6b2f2 /libpthread/nptl/sysdeps/pthread
parent657bc14240cde95ac1c99909df7c6ee0dd0159d4 (diff)
downloaduClibc-alpine-f9df27a905a3a067ccec2bc23d4c1f1e6db9000c.tar.bz2
uClibc-alpine-f9df27a905a3a067ccec2bc23d4c1f1e6db9000c.tar.xz
Sync up with glibc NPTL and clean up unused source files.
Diffstat (limited to 'libpthread/nptl/sysdeps/pthread')
-rw-r--r--libpthread/nptl/sysdeps/pthread/defs.awk26
-rw-r--r--libpthread/nptl/sysdeps/pthread/flockfile.c33
-rw-r--r--libpthread/nptl/sysdeps/pthread/ftrylockfile.c33
-rw-r--r--libpthread/nptl/sysdeps/pthread/funlockfile.c33
-rw-r--r--libpthread/nptl/sysdeps/pthread/pt-initfini.s137
5 files changed, 163 insertions, 99 deletions
diff --git a/libpthread/nptl/sysdeps/pthread/defs.awk b/libpthread/nptl/sysdeps/pthread/defs.awk
new file mode 100644
index 000000000..763c2e57d
--- /dev/null
+++ b/libpthread/nptl/sysdeps/pthread/defs.awk
@@ -0,0 +1,26 @@
+/^[ ]*\.endp/ { need_endp = 1 }
+/^[ ]*\.end/ { need_end = 1 }
+/^[ ]*\.align/ { if($2 > max) max = $2; }
+
+END {
+ if(need_endp)
+ {
+ print "#define END_INIT .endp _init";
+ print "#define END_FINI .endp _fini";
+ } else if(need_end)
+ {
+ print "#define END_INIT .end _init";
+ print "#define END_FINI .end _fini";
+ }
+ else
+ {
+ print "#define END_INIT";
+ print "#define END_FINI";
+ }
+ if(max)
+ print "#define ALIGN .align", max;
+ else
+ print "#define ALIGN";
+
+ print "#include <libc-symbols.h>";
+}
diff --git a/libpthread/nptl/sysdeps/pthread/flockfile.c b/libpthread/nptl/sysdeps/pthread/flockfile.c
deleted file mode 100644
index 918cb84f6..000000000
--- a/libpthread/nptl/sysdeps/pthread/flockfile.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
-
- 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 <pthread.h>
-#include <stdio.h>
-#include <libio.h>
-#include <bits/stdio-lock.h>
-
-
-void
-__flockfile (stream)
- FILE *stream;
-{
- _IO_lock_lock (*stream->_lock);
-}
-strong_alias (__flockfile, _IO_flockfile)
-weak_alias (__flockfile, flockfile)
diff --git a/libpthread/nptl/sysdeps/pthread/ftrylockfile.c b/libpthread/nptl/sysdeps/pthread/ftrylockfile.c
deleted file mode 100644
index 21c1ea01e..000000000
--- a/libpthread/nptl/sysdeps/pthread/ftrylockfile.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
-
- 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 <errno.h>
-#include <pthread.h>
-#include <stdio.h>
-#include <bits/stdio-lock.h>
-
-
-int
-__ftrylockfile (stream)
- FILE *stream;
-{
- return _IO_lock_trylock (*stream->_lock);
-}
-strong_alias (__ftrylockfile, _IO_ftrylockfile)
-weak_alias (__ftrylockfile, ftrylockfile)
diff --git a/libpthread/nptl/sysdeps/pthread/funlockfile.c b/libpthread/nptl/sysdeps/pthread/funlockfile.c
deleted file mode 100644
index f941fc985..000000000
--- a/libpthread/nptl/sysdeps/pthread/funlockfile.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
-
- 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 <pthread.h>
-#include <stdio.h>
-#include <libio.h>
-#include <bits/stdio-lock.h>
-
-
-void
-__funlockfile (stream)
- FILE *stream;
-{
- _IO_lock_unlock (*stream->_lock);
-}
-strong_alias (__funlockfile, _IO_funlockfile)
-weak_alias (__funlockfile, funlockfile)
diff --git a/libpthread/nptl/sysdeps/pthread/pt-initfini.s b/libpthread/nptl/sysdeps/pthread/pt-initfini.s
new file mode 100644
index 000000000..d8e3a7316
--- /dev/null
+++ b/libpthread/nptl/sysdeps/pthread/pt-initfini.s
@@ -0,0 +1,137 @@
+ .file 1 "pt-initfini.c"
+ .section .mdebug.abi32
+ .previous
+ .abicalls
+#APP
+
+#include "defs.h"
+
+/*@HEADER_ENDS*/
+
+/*@TESTS_BEGIN*/
+#NO_APP
+ .text
+ .align 2
+ .globl dummy
+ .type dummy, @function
+dummy:
+ .set noreorder
+ .set nomacro
+
+ beq $4,$0,$L6
+ move $25,$4
+
+ jr $25
+ nop
+
+$L6:
+ j $31
+ nop
+
+ .set macro
+ .set reorder
+#APP
+
+/*@TESTS_END*/
+
+/*@_init_PROLOG_BEGINS*/
+#NO_APP
+ .align 2
+ .type call_initialize_minimal, @function
+call_initialize_minimal:
+ .set noreorder
+ .cpload $25
+ .set nomacro
+
+ lw $25,%call16(__pthread_initialize_minimal_internal)($28)
+ nop
+ jr $25
+ nop
+
+ .set macro
+ .set reorder
+#APP
+ .section .init
+#NO_APP
+ .align 2
+ .globl _init
+ .type _init, @function
+_init:
+ .set noreorder
+ .cpload $25
+ .set reorder
+ addiu $sp,$sp,-32
+ sw $31,24($sp)
+ .cprestore 16
+ lw $25,%got(call_initialize_minimal)($28)
+ #nop
+ addiu $25,$25,%lo(call_initialize_minimal)
+ jalr $25
+ lw $28,16($sp)
+#APP
+ ALIGN
+ END_INIT
+
+/*@_init_PROLOG_ENDS*/
+
+/*@_init_EPILOG_BEGINS*/
+ .section .init
+#NO_APP
+ lw $31,24($sp)
+ #nop
+ .set noreorder
+ .set nomacro
+ j $31
+ addiu $sp,$sp,32
+ .set macro
+ .set reorder
+
+#APP
+ END_INIT
+
+/*@_init_EPILOG_ENDS*/
+
+/*@_fini_PROLOG_BEGINS*/
+ .section .fini
+#NO_APP
+ .align 2
+ .globl _fini
+ .type _fini, @function
+_fini:
+ .set noreorder
+ .cpload $25
+ .set reorder
+ addiu $sp,$sp,-32
+ sw $31,24($sp)
+ .cprestore 16
+#APP
+ ALIGN
+ END_FINI
+
+/*@_fini_PROLOG_ENDS*/
+#NO_APP
+ lw $25,%call16(i_am_not_a_leaf)($28)
+ #nop
+ jalr $25
+ lw $28,16($sp)
+#APP
+
+/*@_fini_EPILOG_BEGINS*/
+ .section .fini
+#NO_APP
+ lw $31,24($sp)
+ #nop
+ .set noreorder
+ .set nomacro
+ j $31
+ addiu $sp,$sp,32
+ .set macro
+ .set reorder
+
+#APP
+ END_FINI
+
+/*@_fini_EPILOG_ENDS*/
+
+/*@TRAILER_BEGINS*/
+ .ident "GCC: (GNU) 4.1.0 20050604 (experimental)"