Index: test/fpu/fpu1/test.c
===================================================================
--- test/fpu/fpu1/test.c	(revision 616f175962fda61a6a7ac7fcc1c3e6bc51d71fa9)
+++ test/fpu/fpu1/test.c	(revision 8d6d76a4bbc459fe99a4a5d4d56fe33a66777b6f)
@@ -81,4 +81,6 @@
 	double e,d,le,f;
 
+	thread_detach(THREAD);
+
 	waitq_sleep(&can_start);
 
@@ -109,7 +111,10 @@
 #endif
 
+
 	int i;
 	double lpi, pi;
 	double n, ab, ad;
+	
+	thread_detach(THREAD);
 
 	waitq_sleep(&can_start);
Index: test/fpu/mips1/test.c
===================================================================
--- test/fpu/mips1/test.c	(revision 616f175962fda61a6a7ac7fcc1c3e6bc51d71fa9)
+++ test/fpu/mips1/test.c	(revision 8d6d76a4bbc459fe99a4a5d4d56fe33a66777b6f)
@@ -50,4 +50,6 @@
 	int arg __attribute__((aligned(16))) = (int)((__native) data);
 	int after_arg __attribute__((aligned(16)));
+
+	thread_detach(THREAD);
 	
 	waitq_sleep(&can_start);
@@ -78,5 +80,7 @@
 	int arg __attribute__((aligned(16))) = (int)((__native) data);
 	int after_arg __attribute__((aligned(16)));
-	
+
+	thread_detach(THREAD);
+
 	waitq_sleep(&can_start);
 
Index: test/fpu/sse1/test.c
===================================================================
--- test/fpu/sse1/test.c	(revision 616f175962fda61a6a7ac7fcc1c3e6bc51d71fa9)
+++ test/fpu/sse1/test.c	(revision 8d6d76a4bbc459fe99a4a5d4d56fe33a66777b6f)
@@ -50,4 +50,6 @@
 	int arg __attribute__((aligned(16))) = (int)((__native) data);
 	int after_arg __attribute__((aligned(16)));
+
+	thread_detach(THREAD);
 	
 	waitq_sleep(&can_start);
@@ -78,4 +80,6 @@
 	int arg __attribute__((aligned(16))) = (int)((__native) data);
 	int after_arg __attribute__((aligned(16)));
+
+	thread_detach(THREAD);
 	
 	waitq_sleep(&can_start);
Index: test/mm/falloc2/test.c
===================================================================
--- test/mm/falloc2/test.c	(revision 616f175962fda61a6a7ac7fcc1c3e6bc51d71fa9)
+++ test/mm/falloc2/test.c	(revision 8d6d76a4bbc459fe99a4a5d4d56fe33a66777b6f)
@@ -58,4 +58,6 @@
 	__address * frames =  (__address *) malloc(MAX_FRAMES * sizeof(__address), FRAME_ATOMIC);
 	ASSERT(frames != NULL);
+	
+	thread_detach(THREAD);
 
 	for (run = 0; run < THREAD_RUNS; run++) {
Index: test/mm/slab1/test.c
===================================================================
--- test/mm/slab1/test.c	(revision 616f175962fda61a6a7ac7fcc1c3e6bc51d71fa9)
+++ test/mm/slab1/test.c	(revision 8d6d76a4bbc459fe99a4a5d4d56fe33a66777b6f)
@@ -113,5 +113,7 @@
 	int offs = (int)(__native) data;
 	int i,j;
-
+	
+	thread_detach(THREAD);
+	
 	printf("Starting thread #%d...\n",THREAD->tid);
 	for (j=0; j<10; j++) {
Index: test/mm/slab2/test.c
===================================================================
--- test/mm/slab2/test.c	(revision 616f175962fda61a6a7ac7fcc1c3e6bc51d71fa9)
+++ test/mm/slab2/test.c	(revision 8d6d76a4bbc459fe99a4a5d4d56fe33a66777b6f)
@@ -127,4 +127,6 @@
 	void *data=NULL, *new;
 
+	thread_detach(THREAD);
+
 	mutex_lock(&starter_mutex);
 	condvar_wait(&thread_starter,&starter_mutex);
Index: test/synch/rwlock2/test.c
===================================================================
--- test/synch/rwlock2/test.c	(revision 616f175962fda61a6a7ac7fcc1c3e6bc51d71fa9)
+++ test/synch/rwlock2/test.c	(revision 8d6d76a4bbc459fe99a4a5d4d56fe33a66777b6f)
@@ -45,4 +45,7 @@
 void writer(void *arg)
 {
+
+	thread_detach(THREAD);
+
 	printf("Trying to lock rwlock for writing....\n");    
 
Index: test/synch/rwlock3/test.c
===================================================================
--- test/synch/rwlock3/test.c	(revision 616f175962fda61a6a7ac7fcc1c3e6bc51d71fa9)
+++ test/synch/rwlock3/test.c	(revision 8d6d76a4bbc459fe99a4a5d4d56fe33a66777b6f)
@@ -45,4 +45,6 @@
 void reader(void *arg)
 {
+	thread_detach(THREAD);
+
 	printf("cpu%d, tid %d: trying to lock rwlock for reading....\n", CPU->id, THREAD->tid);    	
 	rwlock_read_lock(&rwlock);
Index: test/synch/rwlock4/test.c
===================================================================
--- test/synch/rwlock4/test.c	(revision 616f175962fda61a6a7ac7fcc1c3e6bc51d71fa9)
+++ test/synch/rwlock4/test.c	(revision 8d6d76a4bbc459fe99a4a5d4d56fe33a66777b6f)
@@ -74,4 +74,5 @@
 {
 	int rc, to;
+	thread_detach(THREAD);
 	waitq_sleep(&can_start);
 
@@ -96,4 +97,5 @@
 {
 	int rc, to;
+	thread_detach(THREAD);
 	waitq_sleep(&can_start);
 	
Index: test/synch/rwlock5/test.c
===================================================================
--- test/synch/rwlock5/test.c	(revision 616f175962fda61a6a7ac7fcc1c3e6bc51d71fa9)
+++ test/synch/rwlock5/test.c	(revision 8d6d76a4bbc459fe99a4a5d4d56fe33a66777b6f)
@@ -51,4 +51,6 @@
 void writer(void *arg)
 {
+	thread_detach(THREAD);
+
 	waitq_sleep(&can_start);
 
@@ -60,4 +62,6 @@
 void reader(void *arg)
 {
+	thread_detach(THREAD);
+
 	waitq_sleep(&can_start);
 	
Index: test/synch/semaphore1/test.c
===================================================================
--- test/synch/semaphore1/test.c	(revision 616f175962fda61a6a7ac7fcc1c3e6bc51d71fa9)
+++ test/synch/semaphore1/test.c	(revision 8d6d76a4bbc459fe99a4a5d4d56fe33a66777b6f)
@@ -52,4 +52,6 @@
 void producer(void *arg)
 {
+	thread_detach(THREAD);	
+
 	waitq_sleep(&can_start);
 	    
@@ -62,4 +64,6 @@
 void consumer(void *arg)
 {
+	thread_detach(THREAD);	
+	
 	waitq_sleep(&can_start);
 	
Index: test/synch/semaphore2/test.c
===================================================================
--- test/synch/semaphore2/test.c	(revision 616f175962fda61a6a7ac7fcc1c3e6bc51d71fa9)
+++ test/synch/semaphore2/test.c	(revision 8d6d76a4bbc459fe99a4a5d4d56fe33a66777b6f)
@@ -68,4 +68,7 @@
 {
 	int rc, to;
+	
+	thread_detach(THREAD);
+	
 	waitq_sleep(&can_start);
 	
Index: test/thread/thread1/test.c
===================================================================
--- test/thread/thread1/test.c	(revision 616f175962fda61a6a7ac7fcc1c3e6bc51d71fa9)
+++ test/thread/thread1/test.c	(revision 8d6d76a4bbc459fe99a4a5d4d56fe33a66777b6f)
@@ -42,4 +42,7 @@
 static void threadtest(void *data)
 {
+
+	thread_detach(THREAD);	
+
 	while(1)
 	{
