summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-04-06 17:56:11 +0200
committerAustin Foxley <austinf@cetoncorp.com>2010-04-27 08:59:54 -0700
commit23df492e35cf3206b89c699229b35b9cb17791ee (patch)
tree201e7c98f902377491d640a1d35adaa1f6811a17
parentc06dab26652af40a8780790e48bcef1c64aaeb83 (diff)
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 <juhosg@openwrt.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
-rw-r--r--libc/sysdeps/linux/mips/bits/syscalls.h4
1 files changed, 2 insertions, 2 deletions
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)); \