blob: 6ff26307d2d0f95408a99cc5ccf7eec998c168b1 (
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
40
41
42
43
44
45
46
47
48
49
50
|
$NetBSD: patch-ac,v 1.4 2002/03/16 07:31:26 rh Exp $
--- shell/main.c.orig Sat Dec 15 07:21:56 2001
+++ shell/main.c
@@ -63,6 +63,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 GtkWidget *
quit_box_new (void)
@@ -190,6 +207,10 @@
uri_list = (GSList *) data;
+#ifdef __NetBSD__
+ pthread_yield_np();
+#endif
+
shell = e_shell_new (evolution_directory, ! no_splash, &result);
g_free (evolution_directory);
@@ -350,6 +371,10 @@
}
gtk_idle_add (idle_cb, uri_list);
+
+#ifdef __NetBSD__
+ gtk_timeout_add (200, pth_nbschedule, NULL);
+#endif
gtk_widget_push_visual (gdk_rgb_get_visual ());
gtk_widget_push_colormap (gdk_rgb_get_cmap ());
|