From 23df492e35cf3206b89c699229b35b9cb17791ee Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Tue, 6 Apr 2010 17:56:11 +0200 Subject: MIPS: restore INLINE_SYSCALL macro The MIPS specific INLINE_SYSCALL macro has been renamed to INLINE_SYSCALL_NCS with: 763bbf9e9a27426c9be8322dca5ddf2cb4dbc464 syscall: unify part 2: NCS variety Declare common NCS (non-constant syscall) variants and convert the existing ports over to this. This change breaks system calls. The code generated with using of the new macro does not obey the restartable syscall convention used by the linux kernel. When it tries to restart the syscall the errno value is not being replaced by the syscall number. This causes weird behaviour of the 'ping' command in busybox for example: root@OpenWrt:/# ping 192.168.1.254 PING 192.168.1.254 (192.168.1.254): 56 data bytes 64 bytes from 192.168.1.254: seq=0 ttl=128 time=6.292 ms ping: recvfrom: Function not implemented 64 bytes from 192.168.1.254: seq=1 ttl=128 time=0.719 ms ping: recvfrom: Function not implemented 64 bytes from 192.168.1.254: seq=2 ttl=128 time=0.489 ms ping: recvfrom: Function not implemented 64 bytes from 192.168.1.254: seq=3 ttl=128 time=0.486 ms ping: recvfrom: Function not implemented 64 bytes from 192.168.1.254: seq=4 ttl=128 time=0.487 ms ping: recvfrom: Function not implemented 64 bytes from 192.168.1.254: seq=5 ttl=128 time=0.939 ms ping: recvfrom: Function not implemented 64 bytes from 192.168.1.254: seq=6 ttl=128 time=0.971 ms ping: recvfrom: Function not implemented 64 bytes from 192.168.1.254: seq=7 ttl=128 time=0.488 ms ping: recvfrom: Funct^C Signed-off-by: Gabor Juhos Signed-off-by: Austin Foxley --- libc/sysdeps/linux/mips/bits/syscalls.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libc/sysdeps/linux/mips/bits') diff --git a/libc/sysdeps/linux/mips/bits/syscalls.h b/libc/sysdeps/linux/mips/bits/syscalls.h index 28b0f91e9..944d0382d 100644 --- a/libc/sysdeps/linux/mips/bits/syscalls.h +++ b/libc/sysdeps/linux/mips/bits/syscalls.h @@ -19,9 +19,9 @@ /* Define a macro which expands into the inline wrapper code for a system call. */ -#define INLINE_SYSCALL_NCS(name, nr, args...) \ +#define INLINE_SYSCALL(name, nr, args...) \ ({ INTERNAL_SYSCALL_DECL(err); \ - long result_var = INTERNAL_SYSCALL_NCS (name, err, nr, args); \ + long result_var = INTERNAL_SYSCALL(name, err, nr, args); \ if ( INTERNAL_SYSCALL_ERROR_P (result_var, err) ) \ { \ __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, err)); \ -- cgit v1.2.3