threads.h revision 156230
1132233Srwatson/*-
2107626Schris * Copyright (c) 2004, Maxime Henrion <mux@FreeBSD.org>
3115211Sru * All rights reserved.
4108937Schris *
5108937Schris * Redistribution and use in source and binary forms, with or without
6108937Schris * modification, are permitted provided that the following conditions
7107626Schris * are met:
8107626Schris * 1. Redistributions of source code must retain the above copyright
9115211Sru *    notice, this list of conditions and the following disclaimer.
10107626Schris * 2. Redistributions in binary form must reproduce the above copyright
11107626Schris *    notice, this list of conditions and the following disclaimer in the
12107626Schris *    documentation and/or other materials provided with the distribution.
13107626Schris *
14107626Schris * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15107626Schris * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16107626Schris * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17107626Schris * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18115211Sru * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19107626Schris * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20107626Schris * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21107626Schris * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22107626Schris * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23107626Schris * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24107626Schris * SUCH DAMAGE.
25107626Schris *
26107626Schris * $FreeBSD: vendor/csup/dist/contrib/csup/threads.h 156230 2006-03-03 04:11:29Z mux $
27107626Schris */
28107626Schris#ifndef _THREADS_H_
29107626Schris#define _THREADS_H_
30115211Sru
31107626Schrisstruct threads;
32115643Sru
33115643Srustruct threads	*threads_new(void);
34206622Suqsvoid		 threads_create(struct threads *, void *(*)(void *), void *);
35107626Schrisvoid		*threads_wait(struct threads *);
36107626Schrisvoid		 threads_free(struct threads *);
37107626Schris
38115643Sru#endif /* !_THREADS_H_ */
39107626Schris