minix/external/bsd/nvi/dist/common/nothread.c
Lionel Sambuc 84d9c625bf Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)
- Fix for possible unset uid/gid in toproto
 - Fix for default mtree style
 - Update libelf
 - Importing libexecinfo
 - Resynchronize GCC, mpc, gmp, mpfr
 - build.sh: Replace params with show-params.
     This has been done as the make target has been renamed in the same
     way, while a new target named params has been added. This new
     target generates a file containing all the parameters, instead of
     printing it on the console.
 - Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
     get getservbyport() out of the inner loop

Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
2014-07-28 17:05:06 +02:00

57 lines
1.1 KiB
C

/* $NetBSD: nothread.c,v 1.2 2013/11/22 15:52:05 christos Exp $ */
/*-
* Copyright (c) 2000
* Sven Verdoolaege. All rights reserved.
*
* See the LICENSE file for redistribution information.
*/
#include "config.h"
#ifndef lint
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 ";
#endif /* not lint */
#include <sys/types.h>
#include <sys/queue.h>
#include <bitstring.h>
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "../common/common.h"
static int vi_nothread_run __P((WIN *wp, void *(*fun)(void*), void *data));
static int vi_nothread_lock __P((WIN *, void **));
/*
* thread_init
*
* PUBLIC: void thread_init __P((GS *gp));
*/
void
thread_init(GS *gp)
{
gp->run = vi_nothread_run;
gp->lock_init = vi_nothread_lock;
gp->lock_end = vi_nothread_lock;
gp->lock_try = vi_nothread_lock;
gp->lock_unlock = vi_nothread_lock;
}
static int
vi_nothread_run(WIN *wp, void *(*fun)(void*), void *data)
{
fun(data);
return 0;
}
static int
vi_nothread_lock (WIN * wp, void **lp)
{
return 0;
}