Add missing sysinfo() implementation (already declared in <sys/sysinfo.h>) - DO NOT MERGE
Change-Id: Iac4eb5911ffe4a7ab72b84df44e907685ac816af
This commit is contained in:
parent
6304d8b218
commit
aa4b1d0429
@ -244,6 +244,7 @@ int __syslog:syslog(int, char *, int) 103
|
|||||||
int init_module(void *, unsigned long, const char *) 128
|
int init_module(void *, unsigned long, const char *) 128
|
||||||
int delete_module(const char*, unsigned int) 129
|
int delete_module(const char*, unsigned int) 129
|
||||||
int klogctl:syslog(int, char *, int) 103
|
int klogctl:syslog(int, char *, int) 103
|
||||||
|
int sysinfo(struct sysinfo *) 116
|
||||||
|
|
||||||
# futex
|
# futex
|
||||||
int futex(void *, int, int, void *, void *, int) 240
|
int futex(void *, int, int, void *, void *, int) 240
|
||||||
|
@ -161,6 +161,7 @@ syscall_src += arch-arm/syscalls/__syslog.S
|
|||||||
syscall_src += arch-arm/syscalls/init_module.S
|
syscall_src += arch-arm/syscalls/init_module.S
|
||||||
syscall_src += arch-arm/syscalls/delete_module.S
|
syscall_src += arch-arm/syscalls/delete_module.S
|
||||||
syscall_src += arch-arm/syscalls/klogctl.S
|
syscall_src += arch-arm/syscalls/klogctl.S
|
||||||
|
syscall_src += arch-arm/syscalls/sysinfo.S
|
||||||
syscall_src += arch-arm/syscalls/futex.S
|
syscall_src += arch-arm/syscalls/futex.S
|
||||||
syscall_src += arch-arm/syscalls/epoll_create.S
|
syscall_src += arch-arm/syscalls/epoll_create.S
|
||||||
syscall_src += arch-arm/syscalls/epoll_ctl.S
|
syscall_src += arch-arm/syscalls/epoll_ctl.S
|
||||||
|
19
libc/arch-arm/syscalls/sysinfo.S
Normal file
19
libc/arch-arm/syscalls/sysinfo.S
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/* autogenerated by gensyscalls.py */
|
||||||
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
|
.text
|
||||||
|
.type sysinfo, #function
|
||||||
|
.globl sysinfo
|
||||||
|
.align 4
|
||||||
|
.fnstart
|
||||||
|
|
||||||
|
sysinfo:
|
||||||
|
.save {r4, r7}
|
||||||
|
stmfd sp!, {r4, r7}
|
||||||
|
ldr r7, =__NR_sysinfo
|
||||||
|
swi #0
|
||||||
|
ldmfd sp!, {r4, r7}
|
||||||
|
movs r0, r0
|
||||||
|
bxpl lr
|
||||||
|
b __set_syscall_errno
|
||||||
|
.fnend
|
@ -150,6 +150,7 @@ syscall_src += arch-sh/syscalls/__syslog.S
|
|||||||
syscall_src += arch-sh/syscalls/init_module.S
|
syscall_src += arch-sh/syscalls/init_module.S
|
||||||
syscall_src += arch-sh/syscalls/delete_module.S
|
syscall_src += arch-sh/syscalls/delete_module.S
|
||||||
syscall_src += arch-sh/syscalls/klogctl.S
|
syscall_src += arch-sh/syscalls/klogctl.S
|
||||||
|
syscall_src += arch-sh/syscalls/sysinfo.S
|
||||||
syscall_src += arch-sh/syscalls/futex.S
|
syscall_src += arch-sh/syscalls/futex.S
|
||||||
syscall_src += arch-sh/syscalls/epoll_create.S
|
syscall_src += arch-sh/syscalls/epoll_create.S
|
||||||
syscall_src += arch-sh/syscalls/epoll_ctl.S
|
syscall_src += arch-sh/syscalls/epoll_ctl.S
|
||||||
|
32
libc/arch-sh/syscalls/sysinfo.S
Normal file
32
libc/arch-sh/syscalls/sysinfo.S
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
/* autogenerated by gensyscalls.py */
|
||||||
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
|
.text
|
||||||
|
.type sysinfo, @function
|
||||||
|
.globl sysinfo
|
||||||
|
.align 4
|
||||||
|
|
||||||
|
sysinfo:
|
||||||
|
|
||||||
|
/* invoke trap */
|
||||||
|
mov.l 0f, r3 /* trap num */
|
||||||
|
trapa #(1 + 0x10)
|
||||||
|
|
||||||
|
/* check return value */
|
||||||
|
cmp/pz r0
|
||||||
|
bt __NR_sysinfo_end
|
||||||
|
|
||||||
|
/* keep error number */
|
||||||
|
sts.l pr, @-r15
|
||||||
|
mov.l 1f, r1
|
||||||
|
jsr @r1
|
||||||
|
mov r0, r4
|
||||||
|
lds.l @r15+, pr
|
||||||
|
|
||||||
|
__NR_sysinfo_end:
|
||||||
|
rts
|
||||||
|
nop
|
||||||
|
|
||||||
|
.align 2
|
||||||
|
0: .long __NR_sysinfo
|
||||||
|
1: .long __set_syscall_errno
|
@ -164,6 +164,7 @@ syscall_src += arch-x86/syscalls/__syslog.S
|
|||||||
syscall_src += arch-x86/syscalls/init_module.S
|
syscall_src += arch-x86/syscalls/init_module.S
|
||||||
syscall_src += arch-x86/syscalls/delete_module.S
|
syscall_src += arch-x86/syscalls/delete_module.S
|
||||||
syscall_src += arch-x86/syscalls/klogctl.S
|
syscall_src += arch-x86/syscalls/klogctl.S
|
||||||
|
syscall_src += arch-x86/syscalls/sysinfo.S
|
||||||
syscall_src += arch-x86/syscalls/futex.S
|
syscall_src += arch-x86/syscalls/futex.S
|
||||||
syscall_src += arch-x86/syscalls/epoll_create.S
|
syscall_src += arch-x86/syscalls/epoll_create.S
|
||||||
syscall_src += arch-x86/syscalls/epoll_ctl.S
|
syscall_src += arch-x86/syscalls/epoll_ctl.S
|
||||||
|
23
libc/arch-x86/syscalls/sysinfo.S
Normal file
23
libc/arch-x86/syscalls/sysinfo.S
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/* autogenerated by gensyscalls.py */
|
||||||
|
#include <sys/linux-syscalls.h>
|
||||||
|
|
||||||
|
.text
|
||||||
|
.type sysinfo, @function
|
||||||
|
.globl sysinfo
|
||||||
|
.align 4
|
||||||
|
|
||||||
|
sysinfo:
|
||||||
|
pushl %ebx
|
||||||
|
mov 8(%esp), %ebx
|
||||||
|
movl $__NR_sysinfo, %eax
|
||||||
|
int $0x80
|
||||||
|
cmpl $-129, %eax
|
||||||
|
jb 1f
|
||||||
|
negl %eax
|
||||||
|
pushl %eax
|
||||||
|
call __set_errno
|
||||||
|
addl $4, %esp
|
||||||
|
orl $-1, %eax
|
||||||
|
1:
|
||||||
|
popl %ebx
|
||||||
|
ret
|
@ -8,6 +8,9 @@ Differences between current and Android 2.2:
|
|||||||
- <semaphore.h>: Use private futexes for semaphore implementation,
|
- <semaphore.h>: Use private futexes for semaphore implementation,
|
||||||
unless your set 'pshared' to non-0 when calling sem_init().
|
unless your set 'pshared' to non-0 when calling sem_init().
|
||||||
|
|
||||||
|
- <sys/sysinfo.h>: Added missing sysinfo() system call implementation
|
||||||
|
(the function was already declared in the header though).
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Differences between Android 2.2. and Android 2.1:
|
Differences between Android 2.2. and Android 2.1:
|
||||||
|
|
||||||
|
@ -126,6 +126,7 @@
|
|||||||
#define __NR_init_module (__NR_SYSCALL_BASE + 128)
|
#define __NR_init_module (__NR_SYSCALL_BASE + 128)
|
||||||
#define __NR_delete_module (__NR_SYSCALL_BASE + 129)
|
#define __NR_delete_module (__NR_SYSCALL_BASE + 129)
|
||||||
#define __NR_syslog (__NR_SYSCALL_BASE + 103)
|
#define __NR_syslog (__NR_SYSCALL_BASE + 103)
|
||||||
|
#define __NR_sysinfo (__NR_SYSCALL_BASE + 116)
|
||||||
#define __NR_futex (__NR_SYSCALL_BASE + 240)
|
#define __NR_futex (__NR_SYSCALL_BASE + 240)
|
||||||
#define __NR_poll (__NR_SYSCALL_BASE + 168)
|
#define __NR_poll (__NR_SYSCALL_BASE + 168)
|
||||||
|
|
||||||
|
@ -192,6 +192,7 @@ int __syslog (int, char *, int);
|
|||||||
int init_module (void *, unsigned long, const char *);
|
int init_module (void *, unsigned long, const char *);
|
||||||
int delete_module (const char*, unsigned int);
|
int delete_module (const char*, unsigned int);
|
||||||
int klogctl (int, char *, int);
|
int klogctl (int, char *, int);
|
||||||
|
int sysinfo (struct sysinfo *);
|
||||||
int futex (void *, int, int, void *, void *, int);
|
int futex (void *, int, int, void *, void *, int);
|
||||||
int epoll_create (int size);
|
int epoll_create (int size);
|
||||||
int epoll_ctl (int epfd, int op, int fd, struct epoll_event *event);
|
int epoll_ctl (int epfd, int op, int fd, struct epoll_event *event);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user