about summary refs log tree commit diff
path: root/src/internal/pthread_impl.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-07-12 11:23:43 -0400
committerRich Felker <dalias@aerifal.cx>2012-07-12 11:23:43 -0400
commitbbbe87e35cfeef593e23010e35528e722027567f (patch)
tree6027b9323ad2232739d6ea85c9568a654ca1e506 /src/internal/pthread_impl.h
parentc89f130f39b413d1fb1733166ca63d694685c529 (diff)
downloadmusl-bbbe87e35cfeef593e23010e35528e722027567f.tar.gz
musl-bbbe87e35cfeef593e23010e35528e722027567f.tar.xz
musl-bbbe87e35cfeef593e23010e35528e722027567f.zip
fix several locks that weren't updated right for new futex-based __lock
these could have caused memory corruption due to invalid accesses to
the next field. all should be fixed now; I found the errors with fgrep
-r '__lock(&', which is bogus since the argument should be an array.
Diffstat (limited to 'src/internal/pthread_impl.h')
-rw-r--r--src/internal/pthread_impl.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h
index 0ce3c1e8..46d8fdd2 100644
--- a/src/internal/pthread_impl.h
+++ b/src/internal/pthread_impl.h
@@ -28,13 +28,12 @@ struct pthread {
 	pid_t tid, pid;
 	int tsd_used, errno_val, *errno_ptr;
 	volatile int cancel, canceldisable, cancelasync;
+	int detached;
 	unsigned char *map_base;
 	size_t map_size;
 	void *start_arg;
 	void *(*start)(void *);
 	void *result;
-	int detached;
-	int exitlock;
 	struct __ptcb *cancelbuf;
 	void **tsd;
 	pthread_attr_t attr;
@@ -47,7 +46,8 @@ struct pthread {
 	int unblock_cancel;
 	int delete_timer;
 	locale_t locale;
-	int killlock;
+	int killlock[2];
+	int exitlock[2];
 };
 
 struct __timer {