summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/xtensa/vfork.S
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2017-01-22 10:24:51 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2017-01-28 10:31:19 +0100
commitbddde5860ffb8a78587854cc8e3e914bd69269ca (patch)
treed37c90a9ca983fb8be614844343ba2941927f88a /libc/sysdeps/linux/xtensa/vfork.S
parent30adfbeb8843c28869cc6ee33d7c556721cb241a (diff)
remove PID caching
Follow GNU C Library from c579f48edba88380635ab98cb612030e3ed8691e and remove the PID caching. These simplifies the architecture specific assembly code. The run of the test suite found no regressions, it even solves some of the test failures for x86/x86_64/sparc. Reviewed-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Vineet Gupta <Vineet.Gupta1@synopsys.com> Acked-by: Matthew Fortune <Matthew.Fortune@imgtec.com> Acked-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Diffstat (limited to 'libc/sysdeps/linux/xtensa/vfork.S')
-rw-r--r--libc/sysdeps/linux/xtensa/vfork.S25
1 files changed, 0 insertions, 25 deletions
diff --git a/libc/sysdeps/linux/xtensa/vfork.S b/libc/sysdeps/linux/xtensa/vfork.S
index 8058fb057..140ab775e 100644
--- a/libc/sysdeps/linux/xtensa/vfork.S
+++ b/libc/sysdeps/linux/xtensa/vfork.S
@@ -34,16 +34,6 @@
*/
-#ifndef SAVE_PID
-#define SAVE_PID(a,b,c,d)
-#endif
-#ifndef RESTORE_PID
-#define RESTORE_PID(a,b,c)
-#endif
-#ifndef RESTORE_PID12
-#define RESTORE_PID12(a,b,c)
-#endif
-
/*
pid_t vfork(void);
Implemented as __clone_syscall(CLONE_VFORK | CLONE_VM | SIGCHLD, 0)
@@ -73,8 +63,6 @@ HIDDEN_ENTRY (__vfork)
.L4: mov a12, a2
mov a13, a3
- SAVE_PID(a5,a15,a2,a3)
-
/* use syscall 'clone' and set new stack pointer to the same address */
movi a2, SYS_ify(clone)
@@ -83,8 +71,6 @@ HIDDEN_ENTRY (__vfork)
syscall
- RESTORE_PID(a5,a15,a2)
-
movi a5, -4096
mov a6, a2
@@ -102,16 +88,12 @@ HIDDEN_ENTRY (__vfork)
mov a13, a3
mov a14, a6
- SAVE_PID(a9,a15,a2,a3)
-
movi a2, SYS_ify(clone)
movi a3, 0
movi a6, CLONE_VM | CLONE_VFORK | SIGCHLD
syscall
- RESTORE_PID(a9,a15,a2)
-
movi a9, -4096
mov a10, a2
@@ -131,16 +113,12 @@ HIDDEN_ENTRY (__vfork)
mov a13, a3
mov a14, a6
- SAVE_PID (a2,a3,a2,a6)
-
movi a2, SYS_ify(clone)
movi a3, 0
movi a6, CLONE_VM | CLONE_VFORK | SIGCHLD
syscall
- RESTORE_PID12(a3,a6,a15)
-
mov a3, a13
movi a13, -4096
@@ -168,7 +146,6 @@ HIDDEN_ENTRY (__vfork)
.Lpseudo_end:
retw
#elif defined(__XTENSA_CALL0_ABI__)
- SAVE_PID(a5, a8, a3, a4)
/* Use syscall 'clone'. Set new stack pointer to the same address. */
movi a2, SYS_ify (clone)
@@ -176,8 +153,6 @@ HIDDEN_ENTRY (__vfork)
movi a6, CLONE_VM | CLONE_VFORK | SIGCHLD
syscall
- RESTORE_PID(a5, a8, a2)
-
movi a3, -4096
bgeu a2, a3, 1f
ret