blob: 206905afc153d1543bc833c208d458570c87e890 (
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
|
$NetBSD: patch-ai,v 1.4 2004/04/12 20:18:07 jschauma Exp $
--- gthread/testgthread.c.orig Mon Apr 12 14:24:40 2004
+++ gthread/testgthread.c Mon Apr 12 14:25:44 2004
@@ -87,10 +87,22 @@
pthread_attr_setdetachstate (&pthread_attr, PTHREAD_CREATE_JOINABLE);
*/
pthread_create (&thread, &pthread_attr, (void *(*)(void *)) func, data);
+
+#ifdef __sgi
return GUINT_TO_POINTER (thread);
+#else
+ return thread;
+#endif
}
+
+#ifdef __sgi
#define join_thread(thread) \
pthread_join ((pthread_t)GPOINTER_TO_UINT (thread), NULL)
+#else
+#define join_thread(thread) \
+ pthread_join ((thread), NULL)
+#endif
+
#define self_thread() GUINT_TO_POINTER (pthread_self ())
#else /* we are not having a thread implementation, do nothing */
|