summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/m68k/clone.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/m68k/clone.S')
-rw-r--r--sysdeps/unix/sysv/linux/m68k/clone.S29
1 files changed, 4 insertions, 25 deletions
diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S
index 8b40df27c4..0951c89023 100644
--- a/sysdeps/unix/sysv/linux/m68k/clone.S
+++ b/sysdeps/unix/sysv/linux/m68k/clone.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab (schwab@issan.informatik.uni-dortmund.de)
@@ -24,9 +24,6 @@
#include <bits/errno.h>
#include <tls.h>
-#define CLONE_VM 0x00000100
-#define CLONE_THREAD 0x00010000
-
/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
void *parent_tidptr, void *tls, void *child_tidptr) */
@@ -91,33 +88,14 @@ ENTRY (__clone)
tstl %d0
jmi SYSCALL_ERROR_LABEL
- jeq thread_start
+ jeq 1f
rts
-thread_start:
+1:
cfi_startproc
cfi_undefined (pc) /* Mark end of stack */
subl %fp, %fp /* terminate the stack frame */
- /* Check and see if we need to reset the PID. */
- movel %d1, %a1
- andl #CLONE_THREAD, %d1
- jne donepid
- movel %a1, %d1
- movel #-1, %d0
- andl #CLONE_VM, %d1
- jne gotpid
- movel #SYS_ify (getpid), %d0
- trap #0
-gotpid:
- movel %a0, -(%sp)
- movel %d0, -(%sp)
- bsrl __m68k_read_tp@PLTPC
- movel (%sp)+, %d0
- movel %d0, PID_OFFSET(%a0)
- movel %d0, TID_OFFSET(%a0)
- movel (%sp)+, %a0
-donepid:
jsr (%a0)
movel %d0, %d1
movel #SYS_ify (exit), %d0
@@ -127,4 +105,5 @@ donepid:
cfi_startproc
PSEUDO_END (__clone)
+libc_hidden_def (__clone)
weak_alias (__clone, clone)