$NetBSD: patch-ab,v 1.2 2001/05/25 06:16:17 rh Exp $ --- mail/main.c.orig Wed Mar 14 00:31:06 2001 +++ mail/main.c @@ -31,6 +31,24 @@ #include "mail.h" #include "mail-mt.h" + +#ifdef __NetBSD__ +#include +#include + +/* + * NetBSD uses non-preemptive pth, so we yield the processor periodically + */ + +gint +pth_nbschedule (gpointer data) +{ + pthread_yield_np(); + + return TRUE; +} +#endif + /*#define DO_MCHECK*/ #ifdef DO_MCHECK @@ -129,6 +147,10 @@ g_mutex_free (gdk_threads_mutex); gdk_threads_mutex = NULL; } + +#ifdef __NetBSD__ + gtk_timeout_add (200, pth_nbschedule, NULL); +#endif GDK_THREADS_ENTER (); bonobo_main ();