xref: /openbsd/include/pthread_np.h (revision e748cc96)
1*e748cc96Sjca /*	$OpenBSD: pthread_np.h,v 1.3 2019/05/28 10:33:03 jca Exp $	*/
2249f38f2Sguenther /*
3249f38f2Sguenther  * Copyright (c) 1996-98 John Birrell <jb@cimlogic.com.au>.
4249f38f2Sguenther  * All rights reserved.
5249f38f2Sguenther  *
6249f38f2Sguenther  * Redistribution and use in source and binary forms, with or without
7249f38f2Sguenther  * modification, are permitted provided that the following conditions
8249f38f2Sguenther  * are met:
9249f38f2Sguenther  * 1. Redistributions of source code must retain the above copyright
10249f38f2Sguenther  *    notice, this list of conditions and the following disclaimer.
11249f38f2Sguenther  * 2. Redistributions in binary form must reproduce the above copyright
12249f38f2Sguenther  *    notice, this list of conditions and the following disclaimer in the
13249f38f2Sguenther  *    documentation and/or other materials provided with the distribution.
14249f38f2Sguenther  * 3. All advertising materials mentioning features or use of this software
15249f38f2Sguenther  *    must display the following acknowledgement:
16249f38f2Sguenther  *	This product includes software developed by John Birrell.
17249f38f2Sguenther  * 4. Neither the name of the author nor the names of any co-contributors
18249f38f2Sguenther  *    may be used to endorse or promote products derived from this software
19249f38f2Sguenther  *    without specific prior written permission.
20249f38f2Sguenther  *
21249f38f2Sguenther  * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
22249f38f2Sguenther  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23249f38f2Sguenther  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24249f38f2Sguenther  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25249f38f2Sguenther  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26249f38f2Sguenther  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27249f38f2Sguenther  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28249f38f2Sguenther  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29249f38f2Sguenther  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30249f38f2Sguenther  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31249f38f2Sguenther  * SUCH DAMAGE.
32249f38f2Sguenther  *
33249f38f2Sguenther  */
34249f38f2Sguenther #ifndef _PTHREAD_NP_H_
35249f38f2Sguenther #define _PTHREAD_NP_H_
36249f38f2Sguenther 
37*e748cc96Sjca #include <pthread.h>
38*e748cc96Sjca 
39249f38f2Sguenther /*
40249f38f2Sguenther  * Non-POSIX type definitions:
41249f38f2Sguenther  */
42249f38f2Sguenther typedef void	(*pthread_switch_routine_t)(pthread_t, pthread_t);
43249f38f2Sguenther 
44249f38f2Sguenther /*
45249f38f2Sguenther  * Non-POSIX thread function prototype definitions:
46249f38f2Sguenther  */
47249f38f2Sguenther __BEGIN_DECLS
48249f38f2Sguenther int pthread_mutexattr_getkind_np(pthread_mutexattr_t);
49249f38f2Sguenther int pthread_mutexattr_setkind_np(pthread_mutexattr_t *, int);
5029511769Stedu void pthread_get_name_np(pthread_t, char *, size_t);
51249f38f2Sguenther void pthread_set_name_np(pthread_t, const char *);
52249f38f2Sguenther int pthread_stackseg_np(pthread_t, stack_t *);
53249f38f2Sguenther int pthread_main_np(void);
54249f38f2Sguenther __END_DECLS
55249f38f2Sguenther 
56249f38f2Sguenther #endif
57