$NetBSD: patch-ag,v 1.1.1.1 2004/03/03 20:11:53 poppnk Exp $ --- vm/garbage/garbage.c.orig 2003-11-30 15:55:09.000000000 +0000 +++ vm/garbage/garbage.c 2004-03-03 19:36:04.000000000 +0000 @@ -54,6 +54,7 @@ #ifdef KISSME_LINUX_USER #include #include +#include #define __USE_GNU #include #include @@ -272,7 +273,11 @@ while (pstHeap->finalizationThreadControl == GC_THREAD_INIT || pstHeap->garbageThreadControl == GC_THREAD_INIT) { +#if __linux__ pthread_yield(); +#else + sched_yield(); +#endif } totalThreadsInSystem += 2; @@ -298,7 +303,11 @@ sys_condition_signal(pstHeap->gc_run_cond); sys_condition_signal(pstHeap->gc_done_cond); sys_condition_signal(pstHeap->gc_point_cond); +#if __linux__ pthread_yield(); +#else + sched_yield(); +#endif } traceGCThread("Stopped threads");