summaryrefslogtreecommitdiff
path: root/mail/evolution/patches/patch-ac
blob: 72bdce3b46675691deaa5a3ae5c992f1cf6ddd4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
$NetBSD: patch-ac,v 1.2 2001/08/11 18:39:25 rh Exp $

--- shell/main.c.orig	Mon Jul 30 16:22:50 2001
+++ shell/main.c
@@ -53,6 +53,23 @@
 static gboolean no_splash = FALSE;
 extern char *evolution_debug_log;
 
+#ifdef __NetBSD__
+#include <gtk/gtk.h>
+#include <pthread.h>
+
+/*
+ * NetBSD uses non-preemptive pth, so we yield the processor periodically
+ */
+
+gint
+pth_nbschedule (gpointer data)
+{
+	pthread_yield_np();
+
+	return TRUE;
+}
+#endif
+
 
 static void
 no_views_left_cb (EShell *shell, gpointer data)
@@ -273,6 +290,10 @@
 	}
 
 	gtk_idle_add (idle_cb, uri_list);
+
+#ifdef __NetBSD__
+	gtk_timeout_add (200, pth_nbschedule, NULL);
+#endif
 
 	bonobo_main ();