Fix the exit syscall stub's name.
I've left the exit_group syscall as _exit because otherwise we'd have to
convince the compiler that our _exit (which just calls __exit_group) is
actually "noreturn", and it seems like that would be less clean than just
cutting out the middleman.
We'll just have to trust ourselves not to add anything to SYSCALLS.TXT
that ought to be private but that only has a single leading underscore.
Hopefully we can manage that.
Change-Id: Iac47faea9f516186e1774381846c54cafabc4354
diff --git a/libc/bionic/bionic_clone.c b/libc/bionic/bionic_clone.c
index b603a3a..8a17e13 100644
--- a/libc/bionic/bionic_clone.c
+++ b/libc/bionic/bionic_clone.c
@@ -39,14 +39,14 @@
int (*fn)(void *),
void *arg);
-extern void _exit_thread(int status);
+extern void __exit(int status);
/* this function is called from the __bionic_clone
* assembly fragment to call the thread function
* then exit. */
extern void __bionic_clone_entry(int (*fn)(void*), void* arg) {
int status = (*fn)(arg);
- _exit_thread(status);
+ __exit(status);
}
int clone(int (*fn)(void*), void* child_stack, int flags, void* arg, ...) {
diff --git a/libc/bionic/pthread.c b/libc/bionic/pthread.c
index 4a4676a..d2f9254 100644
--- a/libc/bionic/pthread.c
+++ b/libc/bionic/pthread.c
@@ -46,7 +46,7 @@
extern void pthread_debug_mutex_unlock_check(pthread_mutex_t *mutex);
extern void _exit_with_stack_teardown(void * stackBase, size_t stackSize, int status);
-extern void _exit_thread(int status);
+extern void __exit(int status);
int __futex_wake_ex(volatile void *ftx, int pshared, int val)
{
@@ -148,7 +148,7 @@
if (user_stack) {
// Cleaning up this thread's stack is the creator's responsibility, not ours.
- _exit_thread(0);
+ __exit(0);
} else {
// We need to munmap the stack we're running on before calling exit.
// That's not something we can do in C.