am aa4b1d04: Add missing sysinfo() implementation (already declared in <sys/sysinfo.h>) - DO NOT MERGE

This commit is contained in:
David 'Digit' Turner 2010-06-09 13:15:12 -07:00 committed by Android Git Automerger
commit 732d133c1d
10 changed files with 83 additions and 0 deletions

View file

@ -244,6 +244,7 @@ int __syslog:syslog(int, char *, int) 103
int init_module(void *, unsigned long, const char *) 128
int delete_module(const char*, unsigned int) 129
int klogctl:syslog(int, char *, int) 103
int sysinfo(struct sysinfo *) 116
# futex
int futex(void *, int, int, void *, void *, int) 240

View file

@ -161,6 +161,7 @@ syscall_src += arch-arm/syscalls/__syslog.S
syscall_src += arch-arm/syscalls/init_module.S
syscall_src += arch-arm/syscalls/delete_module.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/epoll_create.S
syscall_src += arch-arm/syscalls/epoll_ctl.S

View 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

View file

@ -150,6 +150,7 @@ syscall_src += arch-sh/syscalls/__syslog.S
syscall_src += arch-sh/syscalls/init_module.S
syscall_src += arch-sh/syscalls/delete_module.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/epoll_create.S
syscall_src += arch-sh/syscalls/epoll_ctl.S

View 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

View file

@ -164,6 +164,7 @@ syscall_src += arch-x86/syscalls/__syslog.S
syscall_src += arch-x86/syscalls/init_module.S
syscall_src += arch-x86/syscalls/delete_module.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/epoll_create.S
syscall_src += arch-x86/syscalls/epoll_ctl.S

View 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

View file

@ -8,6 +8,9 @@ Differences between current and Android 2.2:
- <semaphore.h>: Use private futexes for semaphore implementation,
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:

View file

@ -126,6 +126,7 @@
#define __NR_init_module (__NR_SYSCALL_BASE + 128)
#define __NR_delete_module (__NR_SYSCALL_BASE + 129)
#define __NR_syslog (__NR_SYSCALL_BASE + 103)
#define __NR_sysinfo (__NR_SYSCALL_BASE + 116)
#define __NR_futex (__NR_SYSCALL_BASE + 240)
#define __NR_poll (__NR_SYSCALL_BASE + 168)

View file

@ -192,6 +192,7 @@ int __syslog (int, char *, int);
int init_module (void *, unsigned long, const char *);
int delete_module (const char*, unsigned int);
int klogctl (int, char *, int);
int sysinfo (struct sysinfo *);
int futex (void *, int, int, void *, void *, int);
int epoll_create (int size);
int epoll_ctl (int epfd, int op, int fd, struct epoll_event *event);