mips clone: don't free stack space used to copy arg
[musl] / src / internal / pthread_impl.h
index 5c1b206..0ce3c1e 100644 (file)
@@ -27,8 +27,6 @@ struct pthread {
        uintptr_t canary;
        pid_t tid, pid;
        int tsd_used, errno_val, *errno_ptr;
-       /* All cancellation-related fields must remain together, in order */
-       volatile uintptr_t cp_sp, cp_ip;
        volatile int cancel, canceldisable, cancelasync;
        unsigned char *map_base;
        size_t map_size;
@@ -61,7 +59,8 @@ struct __timer {
 
 #define _a_stacksize __u.__s[0]
 #define _a_guardsize __u.__s[1]
-#define _a_detach __u.__i[2*__SU+0]
+#define _a_stackaddr __u.__s[2]
+#define _a_detach __u.__i[3*__SU+0]
 #define _m_type __u.__i[0]
 #define _m_lock __u.__i[1]
 #define _m_waiters __u.__i[2]
@@ -83,7 +82,7 @@ struct __timer {
 #define _b_limit __u.__i[2]
 #define _b_count __u.__i[3]
 #define _b_waiters2 __u.__i[4]
-#define _b_inst __u.__p[4]
+#define _b_inst __u.__p[3]
 
 #include "pthread_arch.h"
 
@@ -112,7 +111,7 @@ void __wake(volatile int *, int, int);
 void __synccall_lock();
 void __synccall_unlock();
 
-#define DEFAULT_STACK_SIZE (16384-PAGE_SIZE)
+#define DEFAULT_STACK_SIZE 81920
 #define DEFAULT_GUARD_SIZE PAGE_SIZE
 
 #endif