sreadahead: adding readahead system call into bionic libc
Add bionic libc to support readahead system call. This is needed to enable sreadahead to work. Change-Id: I3856e1a3833db82e6cf42fd34af7631bd40cc723 Author: Winson Yung <winson.w.yung@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
This commit is contained in:
parent
a37f372973
commit
e30e909363
@ -50,6 +50,7 @@ gid_t getegid:getegid32 () 202
|
||||
uid_t getresuid:getresuid32 () 209
|
||||
gid_t getresgid:getresgid32 () 211
|
||||
pid_t gettid() 224
|
||||
ssize_t readahead(int, off64_t, size_t) 225
|
||||
int getgroups:getgroups32(int, gid_t *) 205
|
||||
pid_t getpgid(pid_t) 132
|
||||
pid_t getppid() 64
|
||||
|
@ -14,6 +14,7 @@ syscall_src += arch-arm/syscalls/getegid.S
|
||||
syscall_src += arch-arm/syscalls/getresuid.S
|
||||
syscall_src += arch-arm/syscalls/getresgid.S
|
||||
syscall_src += arch-arm/syscalls/gettid.S
|
||||
syscall_src += arch-arm/syscalls/readahead.S
|
||||
syscall_src += arch-arm/syscalls/getgroups.S
|
||||
syscall_src += arch-arm/syscalls/getpgid.S
|
||||
syscall_src += arch-arm/syscalls/getppid.S
|
||||
|
16
libc/arch-arm/syscalls/readahead.S
Normal file
16
libc/arch-arm/syscalls/readahead.S
Normal file
@ -0,0 +1,16 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <machine/asm.h>
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
ENTRY(readahead)
|
||||
mov ip, sp
|
||||
.save {r4, r5, r6, r7}
|
||||
stmfd sp!, {r4, r5, r6, r7}
|
||||
ldmfd ip, {r4, r5, r6}
|
||||
ldr r7, =__NR_readahead
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r5, r6, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
END(readahead)
|
@ -15,6 +15,7 @@ syscall_src += arch-sh/syscalls/getegid.S
|
||||
syscall_src += arch-sh/syscalls/getresuid.S
|
||||
syscall_src += arch-sh/syscalls/getresgid.S
|
||||
syscall_src += arch-sh/syscalls/gettid.S
|
||||
syscall_src += arch-sh/syscalls/readahead.S
|
||||
syscall_src += arch-sh/syscalls/getgroups.S
|
||||
syscall_src += arch-sh/syscalls/getpgid.S
|
||||
syscall_src += arch-sh/syscalls/getppid.S
|
||||
|
32
libc/arch-sh/syscalls/readahead.S
Normal file
32
libc/arch-sh/syscalls/readahead.S
Normal file
@ -0,0 +1,32 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type readahead, @function
|
||||
.globl readahead
|
||||
.align 4
|
||||
|
||||
readahead:
|
||||
|
||||
/* invoke trap */
|
||||
mov.l 0f, r3 /* trap num */
|
||||
trapa #(4 + 0x10)
|
||||
|
||||
/* check return value */
|
||||
cmp/pz r0
|
||||
bt __NR_readahead_end
|
||||
|
||||
/* keep error number */
|
||||
sts.l pr, @-r15
|
||||
mov.l 1f, r1
|
||||
jsr @r1
|
||||
mov r0, r4
|
||||
lds.l @r15+, pr
|
||||
|
||||
__NR_readahead_end:
|
||||
rts
|
||||
nop
|
||||
|
||||
.align 2
|
||||
0: .long __NR_readahead
|
||||
1: .long __set_syscall_errno
|
@ -15,6 +15,7 @@ syscall_src += arch-x86/syscalls/getegid.S
|
||||
syscall_src += arch-x86/syscalls/getresuid.S
|
||||
syscall_src += arch-x86/syscalls/getresgid.S
|
||||
syscall_src += arch-x86/syscalls/gettid.S
|
||||
syscall_src += arch-x86/syscalls/readahead.S
|
||||
syscall_src += arch-x86/syscalls/getgroups.S
|
||||
syscall_src += arch-x86/syscalls/getpgid.S
|
||||
syscall_src += arch-x86/syscalls/getppid.S
|
||||
|
32
libc/arch-x86/syscalls/readahead.S
Normal file
32
libc/arch-x86/syscalls/readahead.S
Normal file
@ -0,0 +1,32 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type readahead, @function
|
||||
.globl readahead
|
||||
.align 4
|
||||
|
||||
readahead:
|
||||
pushl %ebx
|
||||
pushl %ecx
|
||||
pushl %edx
|
||||
pushl %esi
|
||||
mov 20(%esp), %ebx
|
||||
mov 24(%esp), %ecx
|
||||
mov 28(%esp), %edx
|
||||
mov 32(%esp), %esi
|
||||
movl $__NR_readahead, %eax
|
||||
int $0x80
|
||||
cmpl $-129, %eax
|
||||
jb 1f
|
||||
negl %eax
|
||||
pushl %eax
|
||||
call __set_errno
|
||||
addl $4, %esp
|
||||
orl $-1, %eax
|
||||
1:
|
||||
popl %esi
|
||||
popl %edx
|
||||
popl %ecx
|
||||
popl %ebx
|
||||
ret
|
@ -20,6 +20,7 @@
|
||||
#define __NR_getresuid32 (__NR_SYSCALL_BASE + 209)
|
||||
#define __NR_getresgid32 (__NR_SYSCALL_BASE + 211)
|
||||
#define __NR_gettid (__NR_SYSCALL_BASE + 224)
|
||||
#define __NR_readahead (__NR_SYSCALL_BASE + 225)
|
||||
#define __NR_getgroups32 (__NR_SYSCALL_BASE + 205)
|
||||
#define __NR_getpgid (__NR_SYSCALL_BASE + 132)
|
||||
#define __NR_getppid (__NR_SYSCALL_BASE + 64)
|
||||
|
@ -20,6 +20,7 @@ gid_t getegid (void);
|
||||
uid_t getresuid (void);
|
||||
gid_t getresgid (void);
|
||||
pid_t gettid (void);
|
||||
ssize_t readahead (int, off64_t, size_t);
|
||||
int getgroups (int, gid_t *);
|
||||
pid_t getpgid (pid_t);
|
||||
pid_t getppid (void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user