1 /* $NetBSD: nothread.c,v 1.3 2014/01/26 21:43:45 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 #include <sys/cdefs.h> 12 #if 0 13 #ifndef lint 14 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 "; 15 #endif /* not lint */ 16 #else 17 __RCSID("$NetBSD: nothread.c,v 1.3 2014/01/26 21:43:45 christos Exp $"); 18 #endif 19 20 #include <sys/types.h> 21 #include <sys/queue.h> 22 23 #include <bitstring.h> 24 #include <ctype.h> 25 #include <errno.h> 26 #include <stdio.h> 27 #include <stdlib.h> 28 #include <string.h> 29 #include <unistd.h> 30 31 #include "../common/common.h" 32 33 static int vi_nothread_run __P((WIN *wp, void *(*fun)(void*), void *data)); 34 static int vi_nothread_lock __P((WIN *, void **)); 35 36 /* 37 * thread_init 38 * 39 * PUBLIC: void thread_init __P((GS *gp)); 40 */ 41 void 42 thread_init(GS *gp) 43 { 44 gp->run = vi_nothread_run; 45 gp->lock_init = vi_nothread_lock; 46 gp->lock_end = vi_nothread_lock; 47 gp->lock_try = vi_nothread_lock; 48 gp->lock_unlock = vi_nothread_lock; 49 } 50 51 static int 52 vi_nothread_run(WIN *wp, void *(*fun)(void*), void *data) 53 { 54 fun(data); 55 return 0; 56 } 57 58 static int 59 vi_nothread_lock (WIN * wp, void **lp) 60 { 61 return 0; 62 } 63