diff options
author | Riku Voipio <riku.voipio@iki.fi> | 2009-08-12 15:08:24 +0300 |
---|---|---|
committer | Riku Voipio <riku.voipio@iki.fi> | 2009-08-25 17:15:26 +0300 |
commit | c2882b96545eeabf16767c6effa836e6f9991018 (patch) | |
tree | b49382d3bbe58cdb763328ec2b4b713d0a095020 /linux-user/syscall.c | |
parent | 4e6f6d4c20252c6900f01787559b97a559c0b402 (diff) |
linux-user: add eventfd support
Straightforward implementation. This syscall is rare enough that we
don't need to support the odder cases, just disable it if host glibc
is too old.
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r-- | linux-user/syscall.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 673eed4ece..603fec265d 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -60,6 +60,9 @@ #ifdef TARGET_GPROF #include <sys/gmon.h> #endif +#ifdef CONFIG_EVENTFD +#include <sys/eventfd.h> +#endif #define termios host_termios #define winsize host_winsize @@ -6974,6 +6977,18 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, break; #endif #endif /* CONFIG_SPLICE */ +#ifdef CONFIG_EVENTFD +#if defined(TARGET_NR_eventfd) + case TARGET_NR_eventfd: + ret = get_errno(eventfd(arg1, 0)); + break; +#endif +#if defined(TARGET_NR_eventfd2) + case TARGET_NR_eventfd2: + ret = get_errno(eventfd(arg1, arg2)); + break; +#endif +#endif /* CONFIG_EVENTFD */ default: unimplemented: gemu_log("qemu: Unsupported syscall: %d\n", num); |