pthread_np.h revision 174585
1221828Sgrehan/*
2221828Sgrehan * Copyright (c) 1996-98 John Birrell <jb@cimlogic.com.au>.
3221828Sgrehan * All rights reserved.
4221828Sgrehan *
5221828Sgrehan * Redistribution and use in source and binary forms, with or without
6221828Sgrehan * modification, are permitted provided that the following conditions
7221828Sgrehan * are met:
8221828Sgrehan * 1. Redistributions of source code must retain the above copyright
9221828Sgrehan *    notice, this list of conditions and the following disclaimer.
10221828Sgrehan * 2. Redistributions in binary form must reproduce the above copyright
11221828Sgrehan *    notice, this list of conditions and the following disclaimer in the
12221828Sgrehan *    documentation and/or other materials provided with the distribution.
13221828Sgrehan * 3. Neither the name of the author nor the names of any co-contributors
14221828Sgrehan *    may be used to endorse or promote products derived from this software
15221828Sgrehan *    without specific prior written permission.
16221828Sgrehan *
17221828Sgrehan * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
18221828Sgrehan * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19221828Sgrehan * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20221828Sgrehan * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21221828Sgrehan * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22221828Sgrehan * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23221828Sgrehan * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24221828Sgrehan * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25221828Sgrehan * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26221828Sgrehan * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27221828Sgrehan * SUCH DAMAGE.
28221828Sgrehan *
29221828Sgrehan * $FreeBSD: head/include/pthread_np.h 174585 2007-12-14 06:25:57Z davidxu $
30221828Sgrehan */
31221828Sgrehan#ifndef _PTHREAD_NP_H_
32221828Sgrehan#define _PTHREAD_NP_H_
33221828Sgrehan
34221828Sgrehan/*
35221828Sgrehan * Non-POSIX type definitions:
36221828Sgrehan */
37221828Sgrehantypedef void	(*pthread_switch_routine_t)(pthread_t, pthread_t);
38221828Sgrehan
39221828Sgrehan/*
40221828Sgrehan * Non-POSIX thread function prototype definitions:
41221828Sgrehan */
42221828Sgrehan__BEGIN_DECLS
43221828Sgrehanint pthread_attr_setcreatesuspend_np(pthread_attr_t *);
44221828Sgrehanint pthread_attr_get_np(pthread_t, pthread_attr_t *);
45221828Sgrehanint pthread_main_np(void);
46221828Sgrehanint pthread_multi_np(void);
47221828Sgrehanint pthread_mutexattr_getkind_np(pthread_mutexattr_t);
48221828Sgrehanint pthread_mutexattr_setkind_np(pthread_mutexattr_t *, int);
49266339Sjhbvoid pthread_resume_all_np(void);
50266339Sjhbint pthread_resume_np(pthread_t);
51221828Sgrehanvoid pthread_set_name_np(pthread_t, const char *);
52221828Sgrehanint pthread_mutex_getspinloops_np(pthread_mutex_t *mutex, int *count);
53221828Sgrehanint pthread_mutex_setspinloops_np(pthread_mutex_t *mutex, int count);
54221828Sgrehanint pthread_mutex_getyieldloops_np(pthread_mutex_t *mutex, int *count);
55221828Sgrehanint pthread_mutex_setyieldloops_np(pthread_mutex_t *mutex, int count);
56221828Sgrehanint pthread_single_np(void);
57221828Sgrehanvoid pthread_suspend_all_np(void);
58221828Sgrehanint pthread_suspend_np(pthread_t);
59221828Sgrehanint pthread_switch_add_np(pthread_switch_routine_t);
60221828Sgrehanint pthread_switch_delete_np(pthread_switch_routine_t);
61221828Sgrehanint pthread_timedjoin_np(pthread_t, void **, const struct timespec *);
62221828Sgrehan__END_DECLS
63221828Sgrehan
64221828Sgrehan#endif
65221828Sgrehan