xref: /titanic_52/usr/src/uts/common/sys/rtpriocntl.h (revision 0eb822a1c0c2bea495647510b75f77f0e57633eb)
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) 1997-2001 by Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28 /*	  All Rights Reserved  	*/
29 
30 
31 #ifndef _SYS_RTPRIOCNTL_H
32 #define	_SYS_RTPRIOCNTL_H
33 
34 #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.4 */
35 
36 #include <sys/types.h>
37 #include <sys/thread.h>
38 
39 #ifdef	__cplusplus
40 extern "C" {
41 #endif
42 
43 /*
44  * Real-time class specific structures for the priocntl system call.
45  */
46 
47 typedef struct rtparms {
48 	pri_t	rt_pri;		/* real-time priority */
49 	uint_t	rt_tqsecs;	/* seconds in time quantum */
50 	int	rt_tqnsecs;	/* additional nanosecs in time quant */
51 } rtparms_t;
52 
53 
54 typedef struct rtinfo {
55 	pri_t	rt_maxpri;	/* maximum configured real-time priority */
56 } rtinfo_t;
57 
58 
59 #define	RT_NOCHANGE	-1
60 #define	RT_TQINF	-2
61 #define	RT_TQDEF	-3
62 
63 /*
64  * Real-time class specific keys for the priocntl system call varargs interface.
65  */
66 #define	RT_KY_PRI	1	/* real-time priority */
67 #define	RT_KY_TQSECS	2	/* seconds in time quantum */
68 #define	RT_KY_TQNSECS	3	/* nanoseconds in time quantum */
69 #define	RT_KY_TQSIG	4	/* real-time time quantum signal */
70 
71 /*
72  * The following is used by the dispadmin(1M) command for
73  * scheduler administration and is not for general use.
74  */
75 
76 #ifdef _SYSCALL32
77 /* Data structure for ILP32 clients */
78 typedef struct rtadmin32 {
79 	caddr32_t	rt_dpents;
80 	int16_t		rt_ndpents;
81 	int16_t		rt_cmd;
82 } rtadmin32_t;
83 #endif /* _SYSCALL32 */
84 
85 typedef struct rtadmin {
86 	struct rtdpent	*rt_dpents;
87 	short		rt_ndpents;
88 	short		rt_cmd;
89 } rtadmin_t;
90 
91 #define	RT_GETDPSIZE	1
92 #define	RT_GETDPTBL	2
93 #define	RT_SETDPTBL	3
94 
95 #ifdef	__cplusplus
96 }
97 #endif
98 
99 #endif	/* _SYS_RTPRIOCNTL_H */
100