Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit d471b7a

Browse files
enh-googleGerrit Code Review
authored andcommitted
Merge "Rename __arch_prctl() to arch_prctl()." into main
2 parents 95eeaef + df79cf1 commit d471b7a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

libc/SYSCALLS.TXT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ int setregid:setregid32(gid_t, gid_t) lp32
8888
int setregid:setregid(gid_t, gid_t) lp64
8989
int chroot(const char*) all
9090
int prctl(int, unsigned long, unsigned long, unsigned long, unsigned long) all
91-
long __arch_prctl:arch_prctl(int, unsigned long) x86_64
9291
int capget(cap_user_header_t header, cap_user_data_t data) all
9392
int capset(cap_user_header_t header, const cap_user_data_t data) all
9493
int sigaltstack(const stack_t*, stack_t*) all
@@ -366,6 +365,7 @@ int __riscv_flush_icache:riscv_flush_icache(void*, void*, unsigned long) riscv64
366365

367366
# x86-specific
368367
int __set_thread_area:set_thread_area(void*) x86
368+
long arch_prctl(int, unsigned long) x86_64
369369

370370
# vdso stuff.
371371
int __clock_getres:clock_getres(clockid_t, struct timespec*) all

libc/arch-x86_64/bionic/__set_tls.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@
2727
*/
2828

2929
#include <sys/cdefs.h>
30+
31+
// ARCH_SET_FS is not exposed via <sys/prctl.h> or <linux/prctl.h>.
3032
#include <asm/prctl.h>
31-
#include <stdint.h>
3233

33-
extern int __arch_prctl(int, unsigned long);
34+
extern int arch_prctl(int, unsigned long);
3435

3536
__LIBC_HIDDEN__ int __set_tls(void* ptr) {
36-
return __arch_prctl(ARCH_SET_FS, (uintptr_t) ptr);
37+
return arch_prctl(ARCH_SET_FS, (unsigned long) ptr);
3738
}

0 commit comments

Comments
 (0)