1331722Seadler/* 235123Sjb * Copyright (c) 1996-98 John Birrell <jb@cimlogic.com.au>. 317706Sjulian * All rights reserved. 417706Sjulian * 517706Sjulian * Redistribution and use in source and binary forms, with or without 617706Sjulian * modification, are permitted provided that the following conditions 717706Sjulian * are met: 817706Sjulian * 1. Redistributions of source code must retain the above copyright 917706Sjulian * notice, this list of conditions and the following disclaimer. 1017706Sjulian * 2. Redistributions in binary form must reproduce the above copyright 1117706Sjulian * notice, this list of conditions and the following disclaimer in the 1217706Sjulian * documentation and/or other materials provided with the distribution. 13173127Simp * 3. Neither the name of the author nor the names of any co-contributors 1417706Sjulian * may be used to endorse or promote products derived from this software 1517706Sjulian * without specific prior written permission. 1617706Sjulian * 1717706Sjulian * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND 1817706Sjulian * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1917706Sjulian * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2017706Sjulian * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2117706Sjulian * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2217706Sjulian * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2317706Sjulian * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2417706Sjulian * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2517706Sjulian * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2617706Sjulian * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2717706Sjulian * SUCH DAMAGE. 2817706Sjulian * 2974462Salfred * $FreeBSD: stable/11/include/pthread_np.h 338405 2018-08-31 05:21:33Z kib $ 3017706Sjulian */ 3117706Sjulian#ifndef _PTHREAD_NP_H_ 3217706Sjulian#define _PTHREAD_NP_H_ 3317706Sjulian 34176760Sdavidxu#include <sys/param.h> 35176760Sdavidxu#include <sys/cpuset.h> 36176760Sdavidxu 3717706Sjulian/* 3844965Sjb * Non-POSIX type definitions: 3944965Sjb */ 4093032Simptypedef void (*pthread_switch_routine_t)(pthread_t, pthread_t); 4144965Sjb 4244965Sjb/* 4317706Sjulian * Non-POSIX thread function prototype definitions: 4417706Sjulian */ 4517706Sjulian__BEGIN_DECLS 4693032Simpint pthread_attr_setcreatesuspend_np(pthread_attr_t *); 47108898Sfjoeint pthread_attr_get_np(pthread_t, pthread_attr_t *); 48176760Sdavidxuint pthread_attr_getaffinity_np(const pthread_attr_t *, size_t, cpuset_t *); 49176760Sdavidxuint pthread_attr_setaffinity_np(pthread_attr_t *, size_t, const cpuset_t *); 50338405Skibvoid pthread_get_name_np(pthread_t, char *, size_t); 51176760Sdavidxuint pthread_getaffinity_np(pthread_t, size_t, cpuset_t *); 52218414Sjkimint pthread_getthreadid_np(void); 5397206Sdeischenint pthread_main_np(void); 5493032Simpint pthread_multi_np(void); 5597206Sdeischenint pthread_mutexattr_getkind_np(pthread_mutexattr_t); 5697206Sdeischenint pthread_mutexattr_setkind_np(pthread_mutexattr_t *, int); 57174585Sdavidxuint pthread_mutex_getspinloops_np(pthread_mutex_t *mutex, int *count); 58174585Sdavidxuint pthread_mutex_setspinloops_np(pthread_mutex_t *mutex, int count); 59174585Sdavidxuint pthread_mutex_getyieldloops_np(pthread_mutex_t *mutex, int *count); 60174585Sdavidxuint pthread_mutex_setyieldloops_np(pthread_mutex_t *mutex, int count); 61176049Sdesint pthread_mutex_isowned_np(pthread_mutex_t *mutex); 62338298Skibvoid pthread_resume_all_np(void); 63338298Skibint pthread_resume_np(pthread_t); 64338298Skibvoid pthread_set_name_np(pthread_t, const char *); 65176760Sdavidxuint pthread_setaffinity_np(pthread_t, size_t, const cpuset_t *); 6693032Simpint pthread_single_np(void); 67105727Sfjoevoid pthread_suspend_all_np(void); 6893032Simpint pthread_suspend_np(pthread_t); 6993032Simpint pthread_switch_add_np(pthread_switch_routine_t); 7093032Simpint pthread_switch_delete_np(pthread_switch_routine_t); 71150902Sdavidxuint pthread_timedjoin_np(pthread_t, void **, const struct timespec *); 7217706Sjulian__END_DECLS 7317706Sjulian 7417706Sjulian#endif 75