only clean out gs when last window goes
[nvi.git] / common / pthread.c
blob04a84ba1169ed4b3c7206d670d697ad88f121c1c
1 /*-
2 * Copyright (c) 2000
3 * Sven Verdoolaege. All rights reserved.
5 * See the LICENSE file for redistribution information.
6 */
8 #include "config.h"
10 #ifndef lint
11 static const char sccsid[] = "$Id: pthread.c,v 1.2 2000/07/04 21:48:54 skimo Exp $ (Berkeley) $Date: 2000/07/04 21:48:54 $";
12 #endif /* not lint */
14 #include <sys/types.h>
15 #include <sys/queue.h>
17 #include <bitstring.h>
18 #include <ctype.h>
19 #include <errno.h>
20 #include <stdio.h>
21 #include <stdlib.h>
22 #include <string.h>
23 #include <unistd.h>
25 #include <pthread.h>
27 #include "../common/common.h"
29 static void vi_pthread_run __P((WIN *wp, void (*fun)(void*), void *data));
32 * thread_init
34 * PUBLIC: void thread_init __P((GS *gp));
36 void
37 thread_init(GS *gp)
39 gp->run = vi_pthread_run;
42 static void
43 vi_pthread_run(WIN *wp, void (*fun)(void*), void *data)
45 pthread_t *t = malloc(sizeof(pthread_t));
46 pthread_create(t, NULL, fun, data);