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