diff options
author | David 'Digit' Turner <digit@google.com> | 2010-09-26 22:29:14 +0200 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2010-09-28 09:20:37 +0200 |
commit | defd162212de3789d2268a1f3339c2a6097fa825 (patch) | |
tree | 35242a10fe8453224718e9da6db3b44f58d8aa15 /libc/arch-x86/syscalls/eventfd.S | |
parent | 9973a564222b842eb7497fd6e659fe8c8c49e2b3 (diff) | |
download | bionic-defd162212de3789d2268a1f3339c2a6097fa825.zip bionic-defd162212de3789d2268a1f3339c2a6097fa825.tar.gz bionic-defd162212de3789d2268a1f3339c2a6097fa825.tar.bz2 |
libc: add <sys/eventfd.h> and corresponding implementations.
Change-Id: Ide040884c456190226e580513099fdb8377e015b
Diffstat (limited to 'libc/arch-x86/syscalls/eventfd.S')
-rw-r--r-- | libc/arch-x86/syscalls/eventfd.S | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/libc/arch-x86/syscalls/eventfd.S b/libc/arch-x86/syscalls/eventfd.S new file mode 100644 index 0000000..104c842 --- /dev/null +++ b/libc/arch-x86/syscalls/eventfd.S @@ -0,0 +1,26 @@ +/* autogenerated by gensyscalls.py */ +#include <sys/linux-syscalls.h> + + .text + .type eventfd, @function + .globl eventfd + .align 4 + +eventfd: + pushl %ebx + pushl %ecx + mov 12(%esp), %ebx + mov 16(%esp), %ecx + movl $__NR_eventfd2, %eax + int $0x80 + cmpl $-129, %eax + jb 1f + negl %eax + pushl %eax + call __set_errno + addl $4, %esp + orl $-1, %eax +1: + popl %ecx + popl %ebx + ret |