summaryrefslogtreecommitdiffstats
path: root/libpthread/nptl/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2005-09-03 05:30:59 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2005-09-03 05:30:59 +0000
commitbc92b8b0af4a59ea83592d2e1d4bf2c21a06d7ec (patch)
tree68b6d1d65266e5e51f41bd292b6ab937f84af01b /libpthread/nptl/sysdeps/unix/sysv/linux
parent9b753727a42d0be0bc0fe110b4d0c582fefc9832 (diff)
downloaduClibc-alpine-bc92b8b0af4a59ea83592d2e1d4bf2c21a06d7ec.tar.bz2
uClibc-alpine-bc92b8b0af4a59ea83592d2e1d4bf2c21a06d7ec.tar.xz
Import latest 'clone' and 'vfork' functions from glibc. These have been tested with the 'linuxthreads' thread model and normal uClibc using the included test suite. This puts me very close to having static NPTL applications working.
Diffstat (limited to 'libpthread/nptl/sysdeps/unix/sysv/linux')
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/mips/clone.S2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S6
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/mips/vfork.S42
4 files changed, 2 insertions, 50 deletions
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile
index 1978413ea..dd2bda972 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile
@@ -21,7 +21,7 @@ TOPDIR=../../../../../../../
include $(TOPDIR)Rules.mak
include ../../../../../Rules.mak
-ASRC-LIBP-ST = pt-vfork.S
+ASRC-LIBP-ST = pt-vfork.S clone.S
ASRC-LIBP-SH = $(ASRC-LIBP-ST)
CSRC-LIBP-ST = pthread_once.c
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/clone.S b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/clone.S
index 80c265bf6..add405523 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/clone.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/clone.S
@@ -1,2 +1,2 @@
#define RESET_PID
-#include <sysdeps/unix/sysv/linux/mips/clone.S>
+#include <../../../../../../../libc/sysdeps/linux/mips/clone.S>
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S
index f82504329..c02ffca93 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S
@@ -35,10 +35,4 @@
sw a2, PID_OFFSET(v1); /* Restore the PID. */ \
1:
-#ifdef __UCLIBC__
-#undef weak_alias
-#define weak_alias(name, aliasname)
#include <../../../../../../../libc/sysdeps/linux/mips/vfork.S>
-#else
-#include <../sysdeps/unix/sysv/linux/mips/vfork.S>
-#endif
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/vfork.S
deleted file mode 100644
index 874a2e2bf..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/vfork.S
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Copyright (C) 2005 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 <tls.h>
-
-/* Save the PID value. */
-#define SAVE_PID \
- READ_THREAD_POINTER(v1); /* Get the thread pointer. */ \
- lw a2, PID_OFFSET(v1); /* Load the saved PID. */ \
- subu a2, $0, a2; /* Negate it. */ \
- bnez a2, 1f; /* If it was zero... */ \
- lui a2, 0x8000; /* use 0x80000000 instead. */ \
-1: sw a2, PID_OFFSET(v1); /* Store the temporary PID. */
-
-/* Restore the old PID value in the parent. */
-#define RESTORE_PID \
- beqz v0, 1f; /* If we are the parent... */ \
- READ_THREAD_POINTER(v1); /* Get the thread pointer. */ \
- lw a2, PID_OFFSET(v1); /* Load the saved PID. */ \
- subu a2, $0, a2; /* Re-negate it. */ \
- lui a0, 0x8000; /* Load 0x80000000... */ \
- bne a2, a0, 2f; /* ... compare against it... */ \
- li a2, 0; /* ... use 0 instead. */ \
-2: sw a2, PID_OFFSET(v1); /* Restore the PID. */ \
-1:
-
-#include <../sysdeps/unix/sysv/linux/mips/vfork.S>