From 224ca9f63688cdecd80ed01c25f5f62871fe4cfc Mon Sep 17 00:00:00 2001 From: "\"Steven J. Hill\"" Date: Tue, 6 Sep 2005 02:18:02 +0000 Subject: Fix 'vfork' for MIPS. The SAVE_PID and RESTORE_PID macros should not be in the libc version at all. Only the libpthread 'pt-vfork.S' will define these. Silly Steven, Trix are for kids. --- libc/sysdeps/linux/mips/vfork.S | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'libc/sysdeps/linux') diff --git a/libc/sysdeps/linux/mips/vfork.S b/libc/sysdeps/linux/mips/vfork.S index 0dbf62e31..3d839f588 100644 --- a/libc/sysdeps/linux/mips/vfork.S +++ b/libc/sysdeps/linux/mips/vfork.S @@ -22,35 +22,6 @@ #include #include -#ifdef __PTHREADS_NATIVE__ -#include - -/* Save the PID value. */ -#ifndef SAVE_PID -#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. */ -#endif - -/* Restore the old PID value in the parent. */ -#ifndef RESTORE_PID -#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: -#endif -#endif - #ifndef SAVE_PID #define SAVE_PID #endif -- cgit v1.2.3