From 8eed661a56099ba0d4f2e03958ac921d1ca40194 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 27 Mar 2003 02:45:47 +0000 Subject: 2003-03-27 Philip Blundell * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_VFORK_SYSCALL): Define for kernel 2.4 on arm. * sysdeps/unix/sysv/linux/arm/vfork.S: Elide compatibility code when __ASSUME_VFORK_SYSCALL is defined. * sysdeps/unix/sysv/linux/arm/mmap64.S: Likewise for __ASSUME_MMAP2_SYSCALL. * sysdeps/unix/sysv/linux/arm/sigaction.c: Likewise for __ASSUME_REALTIME_SIGNALS. --- sysdeps/unix/sysv/linux/arm/vfork.S | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sysdeps/unix/sysv/linux/arm/vfork.S') diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S index a2c6bf3407..0630c7ff06 100644 --- a/sysdeps/unix/sysv/linux/arm/vfork.S +++ b/sysdeps/unix/sysv/linux/arm/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell . @@ -20,6 +20,7 @@ #include #define _ERRNO_H 1 #include +#include /* Clone the calling process, but without copying the whole address space. The calling process is suspended until the new process exits or is @@ -33,17 +34,23 @@ ENTRY (__vfork) cmn a1, #4096 RETINSTR(movcc, pc, lr) +# ifdef __ASSUME_VFORK_SYSCALL + b PLTJMP(C_SYMBOL_NAME(__syscall_error)) +# else /* Check if vfork syscall is known at all. */ ldr a2, =-ENOSYS teq a1, a2 bne PLTJMP(C_SYMBOL_NAME(__syscall_error)) +# endif #endif +#ifndef __ASSUME_VFORK_SYSCALL /* If we don't have vfork, fork is close enough. */ swi __NR_fork cmn a1, #4096 RETINSTR(movcc, pc, lr) b PLTJMP(C_SYMBOL_NAME(__syscall_error)) +#endif PSEUDO_END (__vfork) libc_hidden_def (__vfork) -- cgit v1.2.3