Index: kernel/test/mm/falloc2.c
===================================================================
--- kernel/test/mm/falloc2.c	(revision e0d874b77614e27ea09fe1f3f22e0f6239be9b17)
+++ kernel/test/mm/falloc2.c	(revision c1eaec452eea24d23cfcba31035c7fa507f2a011)
@@ -43,5 +43,4 @@
 #define THREADS      8
 
-static atomic_size_t thread_cnt;
 static atomic_size_t thread_fail;
 
@@ -56,5 +55,4 @@
 		    "Unable to allocate frames\n", THREAD->tid, CPU->id);
 		atomic_inc(&thread_fail);
-		atomic_dec(&thread_cnt);
 		return;
 	}
@@ -108,11 +106,11 @@
 	TPRINTF("Thread #%" PRIu64 " (cpu%u): Exiting\n",
 	    THREAD->tid, CPU->id);
-	atomic_dec(&thread_cnt);
 }
 
 const char *test_falloc2(void)
 {
-	atomic_store(&thread_cnt, THREADS);
 	atomic_store(&thread_fail, 0);
+
+	thread_t *threads[THREADS] = { };
 
 	for (unsigned int i = 0; i < THREADS; i++) {
@@ -123,11 +121,13 @@
 			break;
 		}
-		thread_ready(thrd);
+		thread_start(thrd);
+		threads[i] = thrd;
 	}
 
-	while (atomic_load(&thread_cnt) > 0) {
-		TPRINTF("Threads left: %zu\n",
-		    atomic_load(&thread_cnt));
-		thread_sleep(1);
+	for (unsigned int i = 0; i < THREADS; i++) {
+		if (threads[i] != NULL)
+			thread_join(threads[i]);
+
+		TPRINTF("Threads left: %u\n", THREADS - i - 1);
 	}
 
Index: kernel/test/mm/slab1.c
===================================================================
--- kernel/test/mm/slab1.c	(revision e0d874b77614e27ea09fe1f3f22e0f6239be9b17)
+++ kernel/test/mm/slab1.c	(revision c1eaec452eea24d23cfcba31035c7fa507f2a011)
@@ -121,5 +121,4 @@
 static void *thr_data[THREADS][THR_MEM_COUNT];
 static slab_cache_t *thr_cache;
-static semaphore_t thr_sem;
 
 static void slabtest(void *data)
@@ -142,26 +141,27 @@
 
 	TPRINTF("Thread #%" PRIu64 " finished\n", THREAD->tid);
-
-	semaphore_up(&thr_sem);
 }
 
 static void testthreads(void)
 {
-	thread_t *t;
-	int i;
-
 	thr_cache = slab_cache_create("thread_cache", THR_MEM_SIZE, 0, NULL, NULL,
 	    SLAB_CACHE_NOMAGAZINE);
 
-	semaphore_initialize(&thr_sem, 0);
-	for (i = 0; i < THREADS; i++) {
-		if (!(t = thread_create(slabtest, (void *) (sysarg_t) i, TASK, THREAD_FLAG_NONE, "slabtest"))) {
+	thread_t *threads[THREADS] = { };
+
+	for (int i = 0; i < THREADS; i++) {
+		threads[i] = thread_create(slabtest, (void *) (sysarg_t) i,
+		    TASK, THREAD_FLAG_NONE, "slabtest");
+		if (threads[i]) {
+			thread_start(threads[i]);
+		} else {
 			TPRINTF("Could not create thread %d\n", i);
-		} else
-			thread_ready(t);
+		}
 	}
 
-	for (i = 0; i < THREADS; i++)
-		semaphore_down(&thr_sem);
+	for (int i = 0; i < THREADS; i++) {
+		if (threads[i] != NULL)
+			thread_join(threads[i]);
+	}
 
 	slab_cache_destroy(thr_cache);
Index: kernel/test/mm/slab2.c
===================================================================
--- kernel/test/mm/slab2.c	(revision e0d874b77614e27ea09fe1f3f22e0f6239be9b17)
+++ kernel/test/mm/slab2.c	(revision c1eaec452eea24d23cfcba31035c7fa507f2a011)
@@ -127,5 +127,4 @@
 
 static slab_cache_t *thr_cache;
-static semaphore_t thr_sem;
 static condvar_t thread_starter;
 static mutex_t starter_mutex;
@@ -188,6 +187,4 @@
 	if (!test_quiet)
 		slab_print_list();
-
-	semaphore_up(&thr_sem);
 }
 
@@ -198,6 +195,4 @@
 	 * then release everything, then again allocate, then release
 	 */
-	thread_t *t;
-	int i;
 
 	TPRINTF("Running stress test with size %d\n", size);
@@ -207,16 +202,24 @@
 
 	thr_cache = slab_cache_create("thread_cache", size, 0, NULL, NULL, 0);
-	semaphore_initialize(&thr_sem, 0);
-	for (i = 0; i < THREADS; i++) {
-		if (!(t = thread_create(slabtest, NULL, TASK, THREAD_FLAG_NONE, "slabtest"))) {
+
+	thread_t *threads[THREADS] = { };
+
+	for (int i = 0; i < THREADS; i++) {
+		threads[i] = thread_create(slabtest, NULL,
+		    TASK, THREAD_FLAG_NONE, "slabtest");
+		if (threads[i]) {
+			thread_start(threads[i]);
+		} else {
 			TPRINTF("Could not create thread %d\n", i);
-		} else
-			thread_ready(t);
-	}
+		}
+	}
+
 	thread_sleep(1);
 	condvar_broadcast(&thread_starter);
 
-	for (i = 0; i < THREADS; i++)
-		semaphore_down(&thr_sem);
+	for (int i = 0; i < THREADS; i++) {
+		if (threads[i] != NULL)
+			thread_join(threads[i]);
+	}
 
 	slab_cache_destroy(thr_cache);
Index: kernel/test/synch/semaphore1.c
===================================================================
--- kernel/test/synch/semaphore1.c	(revision e0d874b77614e27ea09fe1f3f22e0f6239be9b17)
+++ kernel/test/synch/semaphore1.c	(revision c1eaec452eea24d23cfcba31035c7fa507f2a011)
@@ -89,16 +89,20 @@
 				thrd = thread_create(consumer, NULL, TASK,
 				    THREAD_FLAG_NONE, "consumer");
-				if (thrd)
-					thread_ready(thrd);
-				else
+				if (thrd) {
+					thread_start(thrd);
+					thread_detach(thrd);
+				} else {
 					TPRINTF("could not create consumer %d\n", i);
+				}
 			}
 			for (k = 0; k < (4 - i); k++) {
 				thrd = thread_create(producer, NULL, TASK,
 				    THREAD_FLAG_NONE, "producer");
-				if (thrd)
-					thread_ready(thrd);
-				else
+				if (thrd) {
+					thread_start(thrd);
+					thread_detach(thrd);
+				} else {
 					TPRINTF("could not create producer %d\n", i);
+				}
 			}
 		}
Index: kernel/test/synch/semaphore2.c
===================================================================
--- kernel/test/synch/semaphore2.c	(revision e0d874b77614e27ea09fe1f3f22e0f6239be9b17)
+++ kernel/test/synch/semaphore2.c	(revision c1eaec452eea24d23cfcba31035c7fa507f2a011)
@@ -92,8 +92,10 @@
 		thrd = thread_create(consumer, NULL, TASK,
 		    THREAD_FLAG_NONE, "consumer");
-		if (thrd)
-			thread_ready(thrd);
-		else
+		if (thrd) {
+			thread_start(thrd);
+			thread_detach(thrd);
+		} else {
 			TPRINTF("Error creating thread\n");
+		}
 	}
 
Index: kernel/test/thread/thread1.c
===================================================================
--- kernel/test/thread/thread1.c	(revision e0d874b77614e27ea09fe1f3f22e0f6239be9b17)
+++ kernel/test/thread/thread1.c	(revision c1eaec452eea24d23cfcba31035c7fa507f2a011)
@@ -38,5 +38,4 @@
 
 static atomic_bool finish;
-static atomic_size_t threads_finished;
 
 static void threadtest(void *data)
@@ -46,24 +45,22 @@
 		thread_usleep(100000);
 	}
-	atomic_inc(&threads_finished);
 }
 
 const char *test_thread1(void)
 {
-	unsigned int i;
-	size_t total = 0;
+	atomic_store(&finish, true);
 
-	atomic_store(&finish, true);
-	atomic_store(&threads_finished, 0);
+	thread_t *threads[THREADS] = { };
 
-	for (i = 0; i < THREADS; i++) {
-		thread_t *t;
-		if (!(t = thread_create(threadtest, NULL, TASK,
-		    THREAD_FLAG_NONE, "threadtest"))) {
+	for (int i = 0; i < THREADS; i++) {
+		threads[i] = thread_create(threadtest, NULL,
+		    TASK, THREAD_FLAG_NONE, "threadtest");
+
+		if (threads[i]) {
+			thread_start(threads[i]);
+		} else {
 			TPRINTF("Could not create thread %d\n", i);
 			break;
 		}
-		thread_ready(t);
-		total++;
 	}
 
@@ -72,7 +69,10 @@
 
 	atomic_store(&finish, false);
-	while (atomic_load(&threads_finished) < total) {
-		TPRINTF("Threads left: %zu\n", total - atomic_load(&threads_finished));
-		thread_sleep(1);
+
+	for (int i = 0; i < THREADS; i++) {
+		if (threads[i] != NULL)
+			thread_join(threads[i]);
+
+		TPRINTF("Threads left: %d\n", THREADS - i - 1);
 	}
 
