diff options
Diffstat (limited to 'libc/sysdeps/linux/mips')
-rw-r--r-- | libc/sysdeps/linux/mips/Makefile.arch | 4 | ||||
-rw-r--r-- | libc/sysdeps/linux/mips/clone.S | 28 | ||||
-rw-r--r-- | libc/sysdeps/linux/mips/vfork.S | 12 |
3 files changed, 2 insertions, 42 deletions
diff --git a/libc/sysdeps/linux/mips/Makefile.arch b/libc/sysdeps/linux/mips/Makefile.arch index 10deedc3e..5e54b07a6 100644 --- a/libc/sysdeps/linux/mips/Makefile.arch +++ b/libc/sysdeps/linux/mips/Makefile.arch @@ -9,11 +9,11 @@ CSRC-y := \ __longjmp.c brk.c setjmp_aux.c \ pread_write.c sigaction.c _test_and_set.c -SSRC-y := bsd-_setjmp.S bsd-setjmp.S setjmp.S syscall.S pipe.S syscall_error.S +SSRC-y := bsd-_setjmp.S bsd-setjmp.S setjmp.S syscall.S pipe.S syscall_error.S \ + vfork.S clone.S CSRC-$(UCLIBC_LINUX_SPECIFIC) += cacheflush.c sysmips.c CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise.c posix_fadvise64.c -SSRC-$(if $(UCLIBC_HAS_THREADS_NATIVE),,y) += vfork.S clone.S SSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += makecontext.S setcontext.S getcontext.S \ swapcontext.S diff --git a/libc/sysdeps/linux/mips/clone.S b/libc/sysdeps/linux/mips/clone.S index 1b5a8f472..326d1d34a 100644 --- a/libc/sysdeps/linux/mips/clone.S +++ b/libc/sysdeps/linux/mips/clone.S @@ -24,9 +24,6 @@ #include <sysdep.h> #define _ERRNO_H 1 #include <bits/errno.h> -#ifdef RESET_PID -#include <tls.h> -#endif #define CLONE_VM 0x00000100 #define CLONE_THREAD 0x00010000 @@ -61,9 +58,6 @@ NESTED(clone,4*SZREG,sp) PTR_SUBU a1,32 /* Reserve argument save space. */ PTR_S a0,0(a1) /* Save function pointer. */ PTR_S a3,PTRSIZE(a1) /* Save argument pointer. */ -#ifdef RESET_PID - LONG_S a2,(PTRSIZE*2)(a1) /* Save clone flags. */ -#endif move a0,a2 @@ -122,14 +116,6 @@ L(thread_start): SAVE_GP (GPOFF) /* The stackframe has been created on entry of clone(). */ -#ifdef RESET_PID - /* Check and see if we need to reset the PID. */ - LONG_L a0,(PTRSIZE*2)(sp) - and a1,a0,CLONE_THREAD - beqz a1,L(restore_pid) -L(donepid): -#endif - /* Restore the arg for user's function. */ PTR_L t9,0(sp) /* Function pointer. */ PTR_L a0,PTRSIZE(sp) /* Argument pointer. */ @@ -146,20 +132,6 @@ L(donepid): jal _exit #endif -#ifdef RESET_PID -L(restore_pid): - and a1,a0,CLONE_VM - li v0,-1 - bnez a1,L(gotpid) - li v0,__NR_getpid - syscall -L(gotpid): - READ_THREAD_POINTER(v1) - INT_S v0,PID_OFFSET(v1) - INT_S v0,TID_OFFSET(v1) - b L(donepid) -#endif - END(__thread_start) weak_alias(clone, __clone) diff --git a/libc/sysdeps/linux/mips/vfork.S b/libc/sysdeps/linux/mips/vfork.S index 494c34fd0..f504c2bb0 100644 --- a/libc/sysdeps/linux/mips/vfork.S +++ b/libc/sysdeps/linux/mips/vfork.S @@ -21,14 +21,6 @@ #include <sys/asm.h> #include <sysdep.h> -#ifndef SAVE_PID -#define SAVE_PID -#endif - -#ifndef RESTORE_PID -#define RESTORE_PID -#endif - #ifdef __NR_fork /* int vfork() */ @@ -50,8 +42,6 @@ NESTED(__vfork,FRAMESZ,sp) PTR_ADDU sp, FRAMESZ - SAVE_PID - li a0, 0x4112 /* CLONE_VM | CLONE_VFORK | SIGCHLD */ move a1, sp @@ -59,8 +49,6 @@ NESTED(__vfork,FRAMESZ,sp) li v0,__NR_clone syscall - RESTORE_PID - bnez a3,L(error) /* Successful return from the parent or child. */ |