134925Sdufault#ifndef _P1003_1B_P1003_1B_H_ 234925Sdufault#define _P1003_1B_P1003_1B_H_ 334030Sdufault/*- 434030Sdufault * Copyright (c) 1996, 1997, 1998 534030Sdufault * HD Associates, Inc. All rights reserved. 634030Sdufault * 734030Sdufault * Redistribution and use in source and binary forms, with or without 834030Sdufault * modification, are permitted provided that the following conditions 934030Sdufault * are met: 1034030Sdufault * 1. Redistributions of source code must retain the above copyright 1134030Sdufault * notice, this list of conditions and the following disclaimer. 1234030Sdufault * 2. Redistributions in binary form must reproduce the above copyright 1334030Sdufault * notice, this list of conditions and the following disclaimer in the 1434030Sdufault * documentation and/or other materials provided with the distribution. 1534030Sdufault * 3. All advertising materials mentioning features or use of this software 1634030Sdufault * must display the following acknowledgement: 1734030Sdufault * This product includes software developed by HD Associates, Inc 1834030Sdufault * 4. Neither the name of the author nor the names of any co-contributors 1934030Sdufault * may be used to endorse or promote products derived from this software 2034030Sdufault * without specific prior written permission. 2134030Sdufault * 2234030Sdufault * THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES AND CONTRIBUTORS ``AS IS'' AND 2334030Sdufault * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2434030Sdufault * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2534030Sdufault * ARE DISCLAIMED. IN NO EVENT SHALL HD ASSOCIATES OR CONTRIBUTORS BE LIABLE 2634030Sdufault * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2734030Sdufault * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2834030Sdufault * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2934030Sdufault * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3034030Sdufault * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3134030Sdufault * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3234030Sdufault * SUCH DAMAGE. 3334030Sdufault * 3455140Sbde * $FreeBSD$ 3534030Sdufault */ 3634030Sdufault 3734030Sdufault#include <sys/param.h> 3834030Sdufault#include <sys/ioccom.h> 3934925Sdufault#include <sys/malloc.h> 40164183Strhodes#include <sys/sched.h> 4134030Sdufault 4234925Sdufault/* Generate syscall stubs for when something is optionally 4345739Speter * loadable as a module. References "syscall_not_present". 4434925Sdufault * XXX Good candidate for sys/syscall.h 4534030Sdufault */ 4634925Sdufaultstruct proc; 4734925Sdufaultstruct nosys_args; 4883366Sjulianextern int syscall_not_present(struct thread *, const char *, struct nosys_args *); 4934030Sdufault 5034925Sdufault#define SYSCALL_NOT_PRESENT_GEN(SC) \ 51225617Skmacyint sys_ ## SC (struct thread *td, struct SC##_args *uap) \ 5234925Sdufault{ \ 5383366Sjulian return syscall_not_present(td, #SC , (struct nosys_args *)uap); \ 5434925Sdufault} 5534030Sdufault 5634030Sdufault 5734925SdufaultMALLOC_DECLARE(M_P31B); 5834030Sdufault 5992727Salfredint p31b_proc(struct proc *, pid_t, struct proc **); 6034925Sdufault 6192727Salfredvoid p31b_setcfg(int, int); 62103574Salfredint p31b_getcfg(int); 63106998Salfredint p31b_iscfg(int); 64208731Skibvoid p31b_unsetcfg(int); 6534925Sdufault 6634925Sdufault#ifdef _KPOSIX_PRIORITY_SCHEDULING 6734925Sdufault 6834030Sdufault/* 6934030Sdufault * KSCHED_OP_RW is a vector of read/write flags for each entry indexed 7034030Sdufault * by the enum ksched_op. 7134030Sdufault * 7234030Sdufault * 1 means you need write access, 0 means read is sufficient. 7334030Sdufault */ 7434030Sdufault 7534030Sdufaultenum ksched_op { 7634030Sdufault 7734030Sdufault#define KSCHED_OP_RW { 1, 0, 1, 0, 0, 0, 0, 0 } 7834030Sdufault 7934030Sdufault SCHED_SETPARAM, 8034030Sdufault SCHED_GETPARAM, 8134030Sdufault SCHED_SETSCHEDULER, 8234030Sdufault SCHED_GETSCHEDULER, 8334030Sdufault SCHED_YIELD, 8434030Sdufault SCHED_GET_PRIORITY_MAX, 8534030Sdufault SCHED_GET_PRIORITY_MIN, 8634030Sdufault SCHED_RR_GET_INTERVAL, 8734030Sdufault SCHED_OP_MAX 8834030Sdufault}; 8934030Sdufault 9034925Sdufaultstruct ksched; 9134030Sdufault 9234925Sdufaultint ksched_attach(struct ksched **); 9334925Sdufaultint ksched_detach(struct ksched *); 9434030Sdufault 95160257Sdavidxuint ksched_setparam(struct ksched *, 9683366Sjulian struct thread *, const struct sched_param *); 97160257Sdavidxuint ksched_getparam(struct ksched *, 9883366Sjulian struct thread *, struct sched_param *); 9934030Sdufault 100160257Sdavidxuint ksched_setscheduler(struct ksched *, 10183366Sjulian struct thread *, int, const struct sched_param *); 102160257Sdavidxuint ksched_getscheduler(struct ksched *, struct thread *, int *); 10334030Sdufault 104160257Sdavidxuint ksched_yield(struct ksched *); 10534030Sdufault 106160257Sdavidxuint ksched_get_priority_max(struct ksched *, int, int *); 107160257Sdavidxuint ksched_get_priority_min(struct ksched *, int, int *); 10834030Sdufault 109160257Sdavidxuint ksched_rr_get_interval(struct ksched *, 11083366Sjulian struct thread *, struct timespec *); 11134030Sdufault 11234925Sdufault#endif /* _KPOSIX_PRIORITY_SCHEDULING */ 11334030Sdufault 11434925Sdufault#endif /* _P1003_1B_P1003_1B_H_ */ 115