Hide accidentally-exposed __clock_nanosleep.

Bug: http://b/21858067
Change-Id: Iaa83a5e17cfff796aed4f641d0d14427614d9399
(cherry picked from commit b1304935b6)
This commit is contained in:
Elliott Hughes 2015-06-15 19:39:04 -07:00
parent f1c85411a8
commit 929be68849
8 changed files with 21 additions and 18 deletions

View File

@ -203,7 +203,7 @@ clock_t times(struct tms*) all
int nanosleep(const struct timespec*, struct timespec*) all
int clock_settime(clockid_t, const struct timespec*) all
int clock_getres(clockid_t, struct timespec*) all
int __clock_nanosleep:clock_nanosleep(clockid_t, int, const struct timespec*, struct timespec*) all
int ___clock_nanosleep:clock_nanosleep(clockid_t, int, const struct timespec*, struct timespec*) all
int getitimer(int, const struct itimerval*) all
int setitimer(int, const struct itimerval*, struct itimerval*) all
int __timer_create:timer_create(clockid_t clockid, struct sigevent* evp, __kernel_timer_t* timerid) all

View File

@ -2,7 +2,7 @@
#include <private/bionic_asm.h>
ENTRY(__clock_nanosleep)
ENTRY(___clock_nanosleep)
mov ip, r7
ldr r7, =__NR_clock_nanosleep
swi #0
@ -11,4 +11,5 @@ ENTRY(__clock_nanosleep)
bxls lr
neg r0, r0
b __set_errno_internal
END(__clock_nanosleep)
END(___clock_nanosleep)
.hidden ___clock_nanosleep

View File

@ -2,7 +2,7 @@
#include <private/bionic_asm.h>
ENTRY(__clock_nanosleep)
ENTRY(___clock_nanosleep)
mov x8, __NR_clock_nanosleep
svc #0
@ -11,5 +11,5 @@ ENTRY(__clock_nanosleep)
b.hi __set_errno_internal
ret
END(__clock_nanosleep)
.hidden __clock_nanosleep
END(___clock_nanosleep)
.hidden ___clock_nanosleep

View File

@ -2,7 +2,7 @@
#include <private/bionic_asm.h>
ENTRY(__clock_nanosleep)
ENTRY(___clock_nanosleep)
.set noreorder
.cpload t9
li v0, __NR_clock_nanosleep
@ -16,4 +16,5 @@ ENTRY(__clock_nanosleep)
j t9
nop
.set reorder
END(__clock_nanosleep)
END(___clock_nanosleep)
.hidden ___clock_nanosleep

View File

@ -2,7 +2,7 @@
#include <private/bionic_asm.h>
ENTRY(__clock_nanosleep)
ENTRY(___clock_nanosleep)
.set push
.set noreorder
li v0, __NR_clock_nanosleep
@ -22,5 +22,5 @@ ENTRY(__clock_nanosleep)
j t9
move ra, t0
.set pop
END(__clock_nanosleep)
.hidden __clock_nanosleep
END(___clock_nanosleep)
.hidden ___clock_nanosleep

View File

@ -2,7 +2,7 @@
#include <private/bionic_asm.h>
ENTRY(__clock_nanosleep)
ENTRY(___clock_nanosleep)
pushl %ebx
.cfi_def_cfa_offset 8
.cfi_rel_offset ebx, 0
@ -33,4 +33,5 @@ ENTRY(__clock_nanosleep)
popl %ecx
popl %ebx
ret
END(__clock_nanosleep)
END(___clock_nanosleep)
.hidden ___clock_nanosleep

View File

@ -2,7 +2,7 @@
#include <private/bionic_asm.h>
ENTRY(__clock_nanosleep)
ENTRY(___clock_nanosleep)
movq %rcx, %r10
movl $__NR_clock_nanosleep, %eax
syscall
@ -13,5 +13,5 @@ ENTRY(__clock_nanosleep)
call __set_errno_internal
1:
ret
END(__clock_nanosleep)
.hidden __clock_nanosleep
END(___clock_nanosleep)
.hidden ___clock_nanosleep

View File

@ -30,9 +30,9 @@
#include "private/ErrnoRestorer.h"
extern "C" int __clock_nanosleep(clockid_t, int, const timespec*, timespec*);
extern "C" int ___clock_nanosleep(clockid_t, int, const timespec*, timespec*);
int clock_nanosleep(clockid_t clock_id, int flags, const timespec* in, timespec* out) {
ErrnoRestorer errno_restorer;
return (__clock_nanosleep(clock_id, flags, in, out) == 0) ? 0 : errno;
return (___clock_nanosleep(clock_id, flags, in, out) == 0) ? 0 : errno;
}