xref: /illumos-gate/usr/src/uts/common/sys/fxpriocntl.h (revision ce17336ed725d3b7fdff67bf0a0ee2b55018fec6)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) 2001 by Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 #ifndef _SYS_FXPRIOCNTL_H
28 #define	_SYS_FXPRIOCNTL_H
29 
30 #include <sys/types.h>
31 #include <sys/thread.h>
32 
33 #ifdef	__cplusplus
34 extern "C" {
35 #endif
36 
37 /*
38  * Fixed-priority class specific structures for the priocntl system call.
39  */
40 
41 typedef struct fxparms {
42 	pri_t	fx_upri;	/* fixed-priority user priority */
43 	pri_t	fx_uprilim;	/* fixed-priority user priority limit */
44 	uint_t	fx_tqsecs;	/* seconds in time quantum */
45 	int	fx_tqnsecs;	/* additional nanosecs in time quant */
46 } fxparms_t;
47 
48 
49 typedef struct fxinfo {
50 	pri_t	fx_maxupri;	/* configured limits of user priority range */
51 } fxinfo_t;
52 
53 
54 #define	FX_NOCHANGE	-32768
55 #define	FX_TQINF	-2
56 #define	FX_TQDEF	-3
57 
58 /*
59  * Fixed-priority class specific keys for the priocntl system call varargs
60  * interface.
61  */
62 #define	FX_KY_UPRILIM	1	/* fixed-priority user priority limit */
63 #define	FX_KY_UPRI	2	/* fixed-priority user priority */
64 #define	FX_KY_TQSECS	3	/* seconds in time quantum */
65 #define	FX_KY_TQNSECS	4	/* nanoseconds in time quantum */
66 
67 
68 /*
69  * The following is used by the dispadmin(8) command for
70  * scheduler administration and is not for general use.
71  */
72 
73 #ifdef _SYSCALL32
74 /* Data structure for ILP32 clients */
75 typedef struct fxadmin32 {
76 	caddr32_t	fx_dpents;
77 	int16_t		fx_ndpents;
78 	int16_t		fx_cmd;
79 } fxadmin32_t;
80 #endif /* _SYSCALL32 */
81 
82 typedef struct fxadmin {
83 	struct fxdpent	*fx_dpents;
84 	short		fx_ndpents;
85 	short		fx_cmd;
86 } fxadmin_t;
87 
88 #define	FX_GETDPSIZE	1
89 #define	FX_GETDPTBL	2
90 #define	FX_SETDPTBL	3
91 
92 #ifdef	__cplusplus
93 }
94 #endif
95 
96 #endif	/* _SYS_FXPRIOCNTL_H */
97