mirror of git://sourceware.org/git/glibc.git
SH: Consolidate NPTL/non versions of clone
This commit is contained in:
parent
1efe2bd9dc
commit
0d3b7a190c
|
|
@ -1,5 +1,9 @@
|
||||||
2014-05-28 Roland McGrath <roland@hack.frob.com>
|
2014-05-28 Roland McGrath <roland@hack.frob.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/sh/clone.S: Deconditionalize the code
|
||||||
|
that was previously under [RESET_PID].
|
||||||
|
* nptl/sysdeps/unix/sysv/linux/sh/clone.S: File removed.
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/tile/arch-fork.h: New file.
|
* sysdeps/unix/sysv/linux/tile/arch-fork.h: New file.
|
||||||
* sysdeps/unix/sysv/linux/tile/nptl/fork.c: File removed.
|
* sysdeps/unix/sysv/linux/tile/nptl/fork.c: File removed.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
/* We want an #include_next, but we are the main source file.
|
|
||||||
So, #include ourselves and in that incarnation we can use #include_next. */
|
|
||||||
#ifndef INCLUDED_SELF
|
|
||||||
# define INCLUDED_SELF
|
|
||||||
# include <clone.S>
|
|
||||||
#else
|
|
||||||
# define RESET_PID
|
|
||||||
# include_next <clone.S>
|
|
||||||
#endif
|
|
||||||
|
|
@ -21,9 +21,8 @@
|
||||||
#include <sysdep.h>
|
#include <sysdep.h>
|
||||||
#define _ERRNO_H 1
|
#define _ERRNO_H 1
|
||||||
#include <bits/errno.h>
|
#include <bits/errno.h>
|
||||||
#ifdef RESET_PID
|
|
||||||
#include <tcb-offsets.h>
|
#include <tcb-offsets.h>
|
||||||
#endif
|
|
||||||
/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
|
/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
|
||||||
pid_t *ptid, void *tls, pid_t *ctid); */
|
pid_t *ptid, void *tls, pid_t *ctid); */
|
||||||
|
|
||||||
|
|
@ -67,7 +66,6 @@ ENTRY(__clone)
|
||||||
2:
|
2:
|
||||||
/* terminate the stack frame */
|
/* terminate the stack frame */
|
||||||
mov #0, r14
|
mov #0, r14
|
||||||
#ifdef RESET_PID
|
|
||||||
mov r4, r0
|
mov r4, r0
|
||||||
shlr16 r0
|
shlr16 r0
|
||||||
tst #1, r0 // CLONE_THREAD = (1 << 16)
|
tst #1, r0 // CLONE_THREAD = (1 << 16)
|
||||||
|
|
@ -89,7 +87,6 @@ ENTRY(__clone)
|
||||||
add r1, r2
|
add r1, r2
|
||||||
mov.l r0, @r2
|
mov.l r0, @r2
|
||||||
4:
|
4:
|
||||||
#endif
|
|
||||||
/* thread starts */
|
/* thread starts */
|
||||||
mov.l @r15, r1
|
mov.l @r15, r1
|
||||||
jsr @r1
|
jsr @r1
|
||||||
|
|
@ -120,12 +117,10 @@ ENTRY(__clone)
|
||||||
.long _GLOBAL_OFFSET_TABLE_
|
.long _GLOBAL_OFFSET_TABLE_
|
||||||
.L3:
|
.L3:
|
||||||
.long PLTJMP(C_SYMBOL_NAME(_exit))
|
.long PLTJMP(C_SYMBOL_NAME(_exit))
|
||||||
#ifdef RESET_PID
|
|
||||||
.Lpidoff:
|
.Lpidoff:
|
||||||
.word PID - TLS_PRE_TCB_SIZE
|
.word PID - TLS_PRE_TCB_SIZE
|
||||||
.Ltidoff:
|
.Ltidoff:
|
||||||
.word TID - TLS_PRE_TCB_SIZE
|
.word TID - TLS_PRE_TCB_SIZE
|
||||||
#endif
|
|
||||||
PSEUDO_END (__clone)
|
PSEUDO_END (__clone)
|
||||||
|
|
||||||
weak_alias (__clone, clone)
|
weak_alias (__clone, clone)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue