Index: kernel/test/fpu/fpu1_ia64.c
===================================================================
--- kernel/test/fpu/fpu1_ia64.c	(revision 98000fb4ea6015506f059c9b121e417ce991ecfd)
+++ kernel/test/fpu/fpu1_ia64.c	(revision 228666c006a3414de772f08f77335c546dd21aab)
@@ -128,5 +128,6 @@
 char *test_fpu1(void)
 {
-	unsigned int i, total = 0;
+	unsigned int i;
+	atomic_count_t total = 0;
 	
 	waitq_initialize(&can_start);
@@ -159,5 +160,5 @@
 	waitq_wakeup(&can_start, WAKEUP_ALL);
 	
-	while (atomic_get(&threads_ok) != (long) total) {
+	while (atomic_get(&threads_ok) != total) {
 		TPRINTF("Threads left: %d\n", total - atomic_get(&threads_ok));
 		thread_sleep(1);
Index: kernel/test/fpu/fpu1_x86.c
===================================================================
--- kernel/test/fpu/fpu1_x86.c	(revision 98000fb4ea6015506f059c9b121e417ce991ecfd)
+++ kernel/test/fpu/fpu1_x86.c	(revision 228666c006a3414de772f08f77335c546dd21aab)
@@ -125,5 +125,6 @@
 char *test_fpu1(void)
 {
-	unsigned int i, total = 0;
+	unsigned int i;
+	atomic_count_t total = 0;
 	
 	waitq_initialize(&can_start);
@@ -156,5 +157,5 @@
 	waitq_wakeup(&can_start, WAKEUP_ALL);
 	
-	while (atomic_get(&threads_ok) != (long) total) {
+	while (atomic_get(&threads_ok) != total) {
 		TPRINTF("Threads left: %d\n", total - atomic_get(&threads_ok));
 		thread_sleep(1);
Index: kernel/test/fpu/mips2.c
===================================================================
--- kernel/test/fpu/mips2.c	(revision 98000fb4ea6015506f059c9b121e417ce991ecfd)
+++ kernel/test/fpu/mips2.c	(revision 228666c006a3414de772f08f77335c546dd21aab)
@@ -111,5 +111,6 @@
 char *test_mips2(void)
 {
-	unsigned int i, total = 0;
+	unsigned int i;
+	atomic_count_t total = 0;
 	
 	waitq_initialize(&can_start);
@@ -138,9 +139,9 @@
 	
 	TPRINTF("ok\n");
-		
+	
 	thread_sleep(1);
 	waitq_wakeup(&can_start, WAKEUP_ALL);
 	
-	while (atomic_get(&threads_ok) != (long) total) {
+	while (atomic_get(&threads_ok) != total) {
 		TPRINTF("Threads left: %d\n", total - atomic_get(&threads_ok));
 		thread_sleep(1);
Index: kernel/test/fpu/sse1.c
===================================================================
--- kernel/test/fpu/sse1.c	(revision 98000fb4ea6015506f059c9b121e417ce991ecfd)
+++ kernel/test/fpu/sse1.c	(revision 228666c006a3414de772f08f77335c546dd21aab)
@@ -109,5 +109,6 @@
 char *test_sse1(void)
 {
-	unsigned int i, total = 0;
+	unsigned int i;
+	atomic_count_t total = 0;
 	
 	waitq_initialize(&can_start);
@@ -140,5 +141,5 @@
 	waitq_wakeup(&can_start, WAKEUP_ALL);
 	
-	while (atomic_get(&threads_ok) != (long) total) {
+	while (atomic_get(&threads_ok) != total) {
 		TPRINTF("Threads left: %d\n", total - atomic_get(&threads_ok));
 		thread_sleep(1);
Index: kernel/test/synch/rwlock5.c
===================================================================
--- kernel/test/synch/rwlock5.c	(revision 98000fb4ea6015506f059c9b121e417ce991ecfd)
+++ kernel/test/synch/rwlock5.c	(revision 228666c006a3414de772f08f77335c546dd21aab)
@@ -70,5 +70,6 @@
 {
 	int i, j, k;
-	long readers, writers;
+	atomic_count_t readers;
+	atomic_count_t writers;
 	
 	waitq_initialize(&can_start);
Index: kernel/test/synch/semaphore1.c
===================================================================
--- kernel/test/synch/semaphore1.c	(revision 98000fb4ea6015506f059c9b121e417ce991ecfd)
+++ kernel/test/synch/semaphore1.c	(revision 228666c006a3414de772f08f77335c546dd21aab)
@@ -73,5 +73,6 @@
 {
 	int i, j, k;
-	int consumers, producers;
+	atomic_count_t consumers;
+	atomic_count_t producers;
 	
 	waitq_initialize(&can_start);
Index: kernel/test/thread/thread1.c
===================================================================
--- kernel/test/thread/thread1.c	(revision 98000fb4ea6015506f059c9b121e417ce991ecfd)
+++ kernel/test/thread/thread1.c	(revision 228666c006a3414de772f08f77335c546dd21aab)
@@ -55,10 +55,11 @@
 char *test_thread1(void)
 {
-	unsigned int i, total = 0;
+	unsigned int i;
+	atomic_count_t total = 0;
 	
 	atomic_set(&finish, 1);
 	atomic_set(&threads_finished, 0);
 	
-	for (i = 0; i < THREADS; i++) {  
+	for (i = 0; i < THREADS; i++) {
 		thread_t *t;
 		if (!(t = thread_create(threadtest, NULL, TASK, 0, "threadtest", false))) {
@@ -74,5 +75,5 @@
 	
 	atomic_set(&finish, 0);
-	while (atomic_get(&threads_finished) < ((long) total)) {
+	while (atomic_get(&threads_finished) < total) {
 		TPRINTF("Threads left: %d\n", total - atomic_get(&threads_finished));
 		thread_sleep(1);
