xref: /titanic_50/usr/src/uts/common/sys/fxpriocntl.h (revision c77a61a72b5ecdc507d6cf104142edd371a16c84)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #include <sys/types.h>
33 #include <sys/thread.h>
34 
35 #ifdef	__cplusplus
36 extern "C" {
37 #endif
38 
39 /*
40  * Fixed-priority class specific structures for the priocntl system call.
41  */
42 
43 typedef struct fxparms {
44 	pri_t	fx_upri;	/* fixed-priority user priority */
45 	pri_t	fx_uprilim;	/* fixed-priority user priority limit */
46 	uint_t	fx_tqsecs;	/* seconds in time quantum */
47 	int	fx_tqnsecs;	/* additional nanosecs in time quant */
48 } fxparms_t;
49 
50 
51 typedef struct fxinfo {
52 	pri_t	fx_maxupri;	/* configured limits of user priority range */
53 } fxinfo_t;
54 
55 
56 #define	FX_NOCHANGE	-32768
57 #define	FX_TQINF	-2
58 #define	FX_TQDEF	-3
59 
60 /*
61  * Fixed-priority class specific keys for the priocntl system call varargs
62  * interface.
63  */
64 #define	FX_KY_UPRILIM	1	/* fixed-priority user priority limit */
65 #define	FX_KY_UPRI	2	/* fixed-priority user priority */
66 #define	FX_KY_TQSECS	3	/* seconds in time quantum */
67 #define	FX_KY_TQNSECS	4	/* nanoseconds in time quantum */
68 
69 
70 /*
71  * The following is used by the dispadmin(1M) command for
72  * scheduler administration and is not for general use.
73  */
74 
75 #ifdef _SYSCALL32
76 /* Data structure for ILP32 clients */
77 typedef struct fxadmin32 {
78 	caddr32_t	fx_dpents;
79 	int16_t		fx_ndpents;
80 	int16_t		fx_cmd;
81 } fxadmin32_t;
82 #endif /* _SYSCALL32 */
83 
84 typedef struct fxadmin {
85 	struct fxdpent	*fx_dpents;
86 	short		fx_ndpents;
87 	short		fx_cmd;
88 } fxadmin_t;
89 
90 #define	FX_GETDPSIZE	1
91 #define	FX_GETDPTBL	2
92 #define	FX_SETDPTBL	3
93 
94 #ifdef	__cplusplus
95 }
96 #endif
97 
98 #endif	/* _SYS_FXPRIOCNTL_H */
99