1 /* $NetBSD: nothread.c,v 1.2 2013/11/22 15:52:05 christos Exp $ */ 2 /*- 3 * Copyright (c) 2000 4 * Sven Verdoolaege. All rights reserved. 5 * 6 * See the LICENSE file for redistribution information. 7 */ 8 9 #include "config.h" 10 11 #ifndef lint 12 static const char sccsid[] = "Id: nothread.c,v 1.4 2000/07/22 14:52:37 skimo Exp (Berkeley) Date: 2000/07/22 14:52:37 "; 13 #endif /* not lint */ 14 15 #include <sys/types.h> 16 #include <sys/queue.h> 17 18 #include <bitstring.h> 19 #include <ctype.h> 20 #include <errno.h> 21 #include <stdio.h> 22 #include <stdlib.h> 23 #include <string.h> 24 #include <unistd.h> 25 26 #include "../common/common.h" 27 28 static int vi_nothread_run __P((WIN *wp, void *(*fun)(void*), void *data)); 29 static int vi_nothread_lock __P((WIN *, void **)); 30 31 /* 32 * thread_init 33 * 34 * PUBLIC: void thread_init __P((GS *gp)); 35 */ 36 void 37 thread_init(GS *gp) 38 { 39 gp->run = vi_nothread_run; 40 gp->lock_init = vi_nothread_lock; 41 gp->lock_end = vi_nothread_lock; 42 gp->lock_try = vi_nothread_lock; 43 gp->lock_unlock = vi_nothread_lock; 44 } 45 46 static int 47 vi_nothread_run(WIN *wp, void *(*fun)(void*), void *data) 48 { 49 fun(data); 50 return 0; 51 } 52 53 static int 54 vi_nothread_lock (WIN * wp, void **lp) 55 { 56 return 0; 57 } 58