diff options
author | Rom Lemarchand <romlem@google.com> | 2013-06-06 14:29:40 -0700 |
---|---|---|
committer | Rom Lemarchand <romlem@google.com> | 2013-06-25 13:18:03 -0700 |
commit | d206b560e72e791b5dfeb339b5f7c18354bf95fd (patch) | |
tree | 43505a7c19af687b367549236c9d12778a263ff7 /libc/arch-x86 | |
parent | 7d624e9aff4c6addea7f2275fe58ff0815d95c70 (diff) | |
download | bionic-d206b560e72e791b5dfeb339b5f7c18354bf95fd.zip bionic-d206b560e72e791b5dfeb339b5f7c18354bf95fd.tar.gz bionic-d206b560e72e791b5dfeb339b5f7c18354bf95fd.tar.bz2 |
libc: add swapon and swapoff syscalls
Change-Id: Ie79dc8e3f2ff1cd427dd6d95e3850920c4b407b0
Signed-off-by: Rom Lemarchand <romlem@google.com>
Diffstat (limited to 'libc/arch-x86')
-rw-r--r-- | libc/arch-x86/syscalls.mk | 2 | ||||
-rw-r--r-- | libc/arch-x86/syscalls/swapoff.S | 21 | ||||
-rw-r--r-- | libc/arch-x86/syscalls/swapon.S | 24 |
3 files changed, 47 insertions, 0 deletions
diff --git a/libc/arch-x86/syscalls.mk b/libc/arch-x86/syscalls.mk index 31eb930..11573de 100644 --- a/libc/arch-x86/syscalls.mk +++ b/libc/arch-x86/syscalls.mk @@ -130,6 +130,8 @@ syscall_src += arch-x86/syscalls/removexattr.S syscall_src += arch-x86/syscalls/lremovexattr.S syscall_src += arch-x86/syscalls/__statfs64.S syscall_src += arch-x86/syscalls/unshare.S +syscall_src += arch-x86/syscalls/swapon.S +syscall_src += arch-x86/syscalls/swapoff.S syscall_src += arch-x86/syscalls/pause.S syscall_src += arch-x86/syscalls/gettimeofday.S syscall_src += arch-x86/syscalls/settimeofday.S diff --git a/libc/arch-x86/syscalls/swapoff.S b/libc/arch-x86/syscalls/swapoff.S new file mode 100644 index 0000000..f2d6ddb --- /dev/null +++ b/libc/arch-x86/syscalls/swapoff.S @@ -0,0 +1,21 @@ +/* autogenerated by gensyscalls.py */ +#include <linux/err.h> +#include <machine/asm.h> +#include <asm/unistd.h> + +ENTRY(swapoff) + pushl %ebx + mov 8(%esp), %ebx + movl $__NR_swapoff, %eax + int $0x80 + cmpl $-MAX_ERRNO, %eax + jb 1f + negl %eax + pushl %eax + call __set_errno + addl $4, %esp + orl $-1, %eax +1: + popl %ebx + ret +END(swapoff) diff --git a/libc/arch-x86/syscalls/swapon.S b/libc/arch-x86/syscalls/swapon.S new file mode 100644 index 0000000..08602fb --- /dev/null +++ b/libc/arch-x86/syscalls/swapon.S @@ -0,0 +1,24 @@ +/* autogenerated by gensyscalls.py */ +#include <linux/err.h> +#include <machine/asm.h> +#include <asm/unistd.h> + +ENTRY(swapon) + pushl %ebx + pushl %ecx + mov 12(%esp), %ebx + mov 16(%esp), %ecx + movl $__NR_swapon, %eax + int $0x80 + cmpl $-MAX_ERRNO, %eax + jb 1f + negl %eax + pushl %eax + call __set_errno + addl $4, %esp + orl $-1, %eax +1: + popl %ecx + popl %ebx + ret +END(swapon) |