Add adjtimex

Change-Id: Ia92d35b1851e73c9f157a749dba1e98f68309a8d
Signed-off-by: Greg Hackmann <ghackmann@google.com>
This commit is contained in:
Greg Hackmann 2016-01-27 17:13:51 -08:00
parent 0e915b294b
commit 3f3f6c526b
8 changed files with 116 additions and 0 deletions

View File

@ -223,6 +223,7 @@ int __timer_delete:timer_delete(__kernel_timer_t)
int timerfd_create(clockid_t, int) all
int timerfd_settime(int, int, const struct itimerspec*, struct itimerspec*) all
int timerfd_gettime(int, struct itimerspec*) all
int adjtimex(struct timex*) all
# signals
int __sigaction:sigaction(int, const struct sigaction*, struct sigaction*) arm,mips,x86

View File

@ -0,0 +1,14 @@
/* Generated by gensyscalls.py. Do not edit. */
#include <private/bionic_asm.h>
ENTRY(adjtimex)
mov ip, r7
ldr r7, =__NR_adjtimex
swi #0
mov r7, ip
cmn r0, #(MAX_ERRNO + 1)
bxls lr
neg r0, r0
b __set_errno_internal
END(adjtimex)

View File

@ -0,0 +1,14 @@
/* Generated by gensyscalls.py. Do not edit. */
#include <private/bionic_asm.h>
ENTRY(adjtimex)
mov x8, __NR_adjtimex
svc #0
cmn x0, #(MAX_ERRNO + 1)
cneg x0, x0, hi
b.hi __set_errno_internal
ret
END(adjtimex)

View File

@ -0,0 +1,19 @@
/* Generated by gensyscalls.py. Do not edit. */
#include <private/bionic_asm.h>
ENTRY(adjtimex)
.set noreorder
.cpload t9
li v0, __NR_adjtimex
syscall
bnez a3, 1f
move a0, v0
j ra
nop
1:
la t9,__set_errno_internal
j t9
nop
.set reorder
END(adjtimex)

View File

@ -0,0 +1,25 @@
/* Generated by gensyscalls.py. Do not edit. */
#include <private/bionic_asm.h>
ENTRY(adjtimex)
.set push
.set noreorder
li v0, __NR_adjtimex
syscall
bnez a3, 1f
move a0, v0
j ra
nop
1:
move t0, ra
bal 2f
nop
2:
.cpsetup ra, t1, 2b
LA t9,__set_errno_internal
.cpreturn
j t9
move ra, t0
.set pop
END(adjtimex)

View File

@ -0,0 +1,21 @@
/* Generated by gensyscalls.py. Do not edit. */
#include <private/bionic_asm.h>
ENTRY(adjtimex)
pushl %ebx
.cfi_def_cfa_offset 8
.cfi_rel_offset ebx, 0
mov 8(%esp), %ebx
movl $__NR_adjtimex, %eax
int $0x80
cmpl $-MAX_ERRNO, %eax
jb 1f
negl %eax
pushl %eax
call __set_errno_internal
addl $4, %esp
1:
popl %ebx
ret
END(adjtimex)

View File

@ -0,0 +1,15 @@
/* Generated by gensyscalls.py. Do not edit. */
#include <private/bionic_asm.h>
ENTRY(adjtimex)
movl $__NR_adjtimex, %eax
syscall
cmpq $-MAX_ERRNO, %rax
jb 1f
negl %eax
movl %eax, %edi
call __set_errno_internal
1:
ret
END(adjtimex)

View File

@ -29,6 +29,13 @@
#ifndef _SYS_TIMEX_H_
#define _SYS_TIMEX_H_
#include <sys/cdefs.h>
#include <linux/timex.h>
__BEGIN_DECLS
extern int adjtimex(struct timex *buf);
__END_DECLS
#endif /* _SYS_TIMEX_H_ */