xref: /freebsd/include/pthread_np.h (revision b847980f1531b6a497fb7601bb2f9dec7d88a681)
10f7d6847SJulian Elischer /*
21c1426e1SJohn Birrell  * Copyright (c) 1996-98 John Birrell <jb@cimlogic.com.au>.
30f7d6847SJulian Elischer  * All rights reserved.
40f7d6847SJulian Elischer  *
50f7d6847SJulian Elischer  * Redistribution and use in source and binary forms, with or without
60f7d6847SJulian Elischer  * modification, are permitted provided that the following conditions
70f7d6847SJulian Elischer  * are met:
80f7d6847SJulian Elischer  * 1. Redistributions of source code must retain the above copyright
90f7d6847SJulian Elischer  *    notice, this list of conditions and the following disclaimer.
100f7d6847SJulian Elischer  * 2. Redistributions in binary form must reproduce the above copyright
110f7d6847SJulian Elischer  *    notice, this list of conditions and the following disclaimer in the
120f7d6847SJulian Elischer  *    documentation and/or other materials provided with the distribution.
130f7d6847SJulian Elischer  * 3. All advertising materials mentioning features or use of this software
140f7d6847SJulian Elischer  *    must display the following acknowledgement:
150f7d6847SJulian Elischer  *	This product includes software developed by John Birrell.
160f7d6847SJulian Elischer  * 4. Neither the name of the author nor the names of any co-contributors
170f7d6847SJulian Elischer  *    may be used to endorse or promote products derived from this software
180f7d6847SJulian Elischer  *    without specific prior written permission.
190f7d6847SJulian Elischer  *
200f7d6847SJulian Elischer  * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
210f7d6847SJulian Elischer  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
220f7d6847SJulian Elischer  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
230f7d6847SJulian Elischer  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
240f7d6847SJulian Elischer  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
250f7d6847SJulian Elischer  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
260f7d6847SJulian Elischer  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
270f7d6847SJulian Elischer  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
280f7d6847SJulian Elischer  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
290f7d6847SJulian Elischer  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
300f7d6847SJulian Elischer  * SUCH DAMAGE.
310f7d6847SJulian Elischer  *
320f7d6847SJulian Elischer  */
330f7d6847SJulian Elischer #ifndef _PTHREAD_NP_H_
340f7d6847SJulian Elischer #define _PTHREAD_NP_H_
350f7d6847SJulian Elischer 
360f7d6847SJulian Elischer /*
37b847980fSJohn Birrell  * Non-POSIX type definitions:
38b847980fSJohn Birrell  */
39b847980fSJohn Birrell typedef void	(*pthread_switch_routine_t) __P((pthread_t, pthread_t));
40b847980fSJohn Birrell 
41b847980fSJohn Birrell /*
420f7d6847SJulian Elischer  * Non-POSIX thread function prototype definitions:
430f7d6847SJulian Elischer  */
440f7d6847SJulian Elischer __BEGIN_DECLS
450f7d6847SJulian Elischer int pthread_attr_setcreatesuspend_np __P((pthread_attr_t *));
460f7d6847SJulian Elischer int pthread_multi_np __P((void));
470f7d6847SJulian Elischer int pthread_resume_np __P((pthread_t));
480f7d6847SJulian Elischer int pthread_single_np __P((void));
490f7d6847SJulian Elischer int pthread_suspend_np __P((pthread_t));
507d9120c4SJeffrey Hsu int pthread_mutexattr_getkind_np __P((pthread_mutexattr_t attr));
517d9120c4SJeffrey Hsu int pthread_mutexattr_setkind_np __P((pthread_mutexattr_t *attr, int kind));
521c1426e1SJohn Birrell void pthread_set_name_np __P((pthread_t, char *));
53b847980fSJohn Birrell int pthread_switch_add_np (pthread_switch_routine_t routine);
54b847980fSJohn Birrell int pthread_switch_delete_np (pthread_switch_routine_t routine);
550f7d6847SJulian Elischer __END_DECLS
560f7d6847SJulian Elischer 
570f7d6847SJulian Elischer #endif
58