summaryrefslogtreecommitdiffstats
path: root/libc/arch-mips
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-02-14 18:59:37 -0800
committerElliott Hughes <enh@google.com>2013-02-15 12:08:59 -0800
commit40eabe24e4e3ae8ebe437f1f4e43cf39cbba2e9e (patch)
tree19eef7fcbba616a52bd37f4c83ece3e918b25445 /libc/arch-mips
parent3e3b239d2be0c5a92e91385f4f10b8f7da8d2837 (diff)
downloadbionic-40eabe24e4e3ae8ebe437f1f4e43cf39cbba2e9e.zip
bionic-40eabe24e4e3ae8ebe437f1f4e43cf39cbba2e9e.tar.gz
bionic-40eabe24e4e3ae8ebe437f1f4e43cf39cbba2e9e.tar.bz2
Fix the pthread_setname_np test.
Fix the pthread_setname_np test to take into account that emulator kernels are so old that they don't support setting the name of other threads. The CLONE_DETACHED thread is obsolete since 2.5 kernels. Rename kernel_id to tid. Fix the signature of __pthread_clone. Clean up the clone and pthread_setname_np implementations slightly. Change-Id: I16c2ff8845b67530544bbda9aa6618058603066d
Diffstat (limited to 'libc/arch-mips')
-rw-r--r--libc/arch-mips/bionic/clone.S13
1 files changed, 6 insertions, 7 deletions
diff --git a/libc/arch-mips/bionic/clone.S b/libc/arch-mips/bionic/clone.S
index 30fef8d..007e909 100644
--- a/libc/arch-mips/bionic/clone.S
+++ b/libc/arch-mips/bionic/clone.S
@@ -28,15 +28,15 @@
#include <linux/sched.h>
#include <sys/linux-syscalls.h>
#include <linux/errno.h>
-
+
.text
.type __pthread_clone, @function
.global __pthread_clone
.align 4
.ent __pthread_clone
-
+
/*
- * int __pthread_clone(int (*fn)(void*), void *child_stack,
+ * int __pthread_clone(void* (*fn)(void*), void *child_stack,
* int flags, void *arg);
*/
@@ -69,7 +69,7 @@ __pthread_clone:
bnez $a3,.L__error
beqz $v0,.L__thread_start
-
+
j $ra
.L__thread_start:
@@ -77,7 +77,7 @@ __pthread_clone:
lw $a1,4($sp) # arg
addu $a2,$sp,16 # tls
- # void __thread_entry(int (*func)(void*), void *arg, void *tls)
+ # void __thread_entry(void* (*func)(void*), void *arg, void *tls)
la $t9, __thread_entry
j $t9
@@ -125,7 +125,7 @@ __bionic_clone:
bnez $a3,.L__error_bc
beqz $v0,.L__thread_start_bc
-
+
j $ra
.L__thread_start_bc:
@@ -142,4 +142,3 @@ __bionic_clone:
j $t9
.end __bionic_clone
-