xref: /titanic_50/usr/src/uts/common/sys/iapriocntl.h (revision 3d729aecc03ea6ebb9bd5d56b8dccd24f57daa41)
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 (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28 /*	  All Rights Reserved  	*/
29 
30 #ifndef _SYS_IAPRIOCNTL_H
31 #define	_SYS_IAPRIOCNTL_H
32 
33 #pragma ident	"%Z%%M%	%I%	%E% SMI"
34 
35 #include <sys/types.h>
36 #include <sys/thread.h>
37 
38 #ifdef	__cplusplus
39 extern "C" {
40 #endif
41 
42 /*
43  * Interactive class specific structures for the priocntl system call.
44  */
45 
46 /*
47  * Beginning of iaparms structure must match tsparms structure so they
48  * can be used interchangeably.
49  */
50 
51 typedef struct iaparms {
52 	pri_t	ia_uprilim;		/* user priority limit */
53 	pri_t	ia_upri;		/* user priority */
54 	int	ia_mode;		/* interactive on/off */
55 } iaparms_t;
56 
57 typedef struct iaclass {
58 	id_t	pc_cid;
59 	int	pc_clparms[PC_CLPARMSZ];
60 } iaclass_t;
61 
62 typedef struct iainfo {
63 	pri_t	ia_maxupri;	/* configured limits of user priority range */
64 } iainfo_t;
65 
66 #define	IA_NOCHANGE	-32768
67 #define	IAMAXUPRI	60
68 #define	IAOFFUPRI	29
69 #define	IANPROCS	60
70 #define	IA_INTERACTIVE_OFF	0x00	/* thread is not interactive */
71 #define	IA_SET_INTERACTIVE	0x01	/* thread is interactive */
72 #define	IA_BOOST	10		/* value for boost */
73 
74 /*
75  * Interactive class specific keys for the priocntl system call
76  * varargs interface.
77  */
78 #define	IA_KY_UPRILIM	1	/* user priority limit */
79 #define	IA_KY_UPRI	2	/* user priority */
80 #define	IA_KY_MODE	3	/* interactive on/off */
81 
82 /*
83  * The following is used by the dispadmin(1M) command for
84  * scheduler administration and is not for general use.
85  */
86 
87 #ifdef _SYSCALL32
88 /* Data structure for ILP32 clients */
89 typedef struct iaadmin32 {
90 	caddr32_t	ia_dpents;
91 	int16_t		ia_ndpents;
92 	int16_t		ia_cmd;
93 } iaadmin32_t;
94 #endif /* _SYSCALL32 */
95 
96 typedef struct iaadmin {
97 	struct iadpent	*ia_dpents;
98 	short		ia_ndpents;
99 	short		ia_cmd;
100 } iaadmin_t;
101 
102 #define	IA_GETDPSIZE	1
103 #define	IA_GETDPTBL	2
104 #define	IA_SETDPTBL	3
105 
106 #ifdef	__cplusplus
107 }
108 #endif
109 
110 #endif	/* _SYS_IAPRIOCNTL_H */
111