Trevor Drake | 49ea11e | 2013-10-05 21:33:20 +0100 | [diff] [blame] | 1 | /* autogenerated by gensyscalls.py */ |
maxwen | 27116ba | 2015-08-14 21:41:28 +0200 | [diff] [blame] | 2 | |
3 | #ifdef BIONIC_L | ||||
4 | # include <private/bionic_asm.h> | ||||
5 | #else | ||||
6 | # include <asm/unistd.h> | ||||
7 | # include <asm/unistd.h> | ||||
8 | # include <linux/err.h> | ||||
9 | # include <machine/asm.h> | ||||
10 | #endif | ||||
Trevor Drake | 49ea11e | 2013-10-05 21:33:20 +0100 | [diff] [blame] | 11 | |
12 | .text | ||||
13 | .type swapon, @function | ||||
14 | .globl swapon | ||||
15 | .align 4 | ||||
16 | |||||
17 | swapon: | ||||
18 | pushl %ebx | ||||
19 | pushl %ecx | ||||
20 | mov 12(%esp), %ebx | ||||
21 | mov 16(%esp), %ecx | ||||
22 | movl $__NR_swapon, %eax | ||||
23 | int $0x80 | ||||
24 | cmpl $-MAX_ERRNO, %eax | ||||
25 | jb 1f | ||||
26 | negl %eax | ||||
27 | pushl %eax | ||||
28 | call __set_errno | ||||
29 | addl $4, %esp | ||||
30 | orl $-1, %eax | ||||
31 | 1: | ||||
32 | popl %ecx | ||||
33 | popl %ebx | ||||
34 | ret | ||||
35 |