xref: /titanic_51/usr/src/uts/common/sys/tspriocntl.h (revision e07d9cb85217949d497b02d7211de8a197d2f2eb)
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 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23 /*	  All Rights Reserved  	*/
24 
25 
26 /*
27  * Copyright (c) 2001 by Sun Microsystems, Inc.
28  * All rights reserved.
29  */
30 
31 #ifndef _SYS_TSPRIOCNTL_H
32 #define	_SYS_TSPRIOCNTL_H
33 
34 #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.5 */
35 
36 #include <sys/types.h>
37 #include <sys/thread.h>
38 
39 #ifdef	__cplusplus
40 extern "C" {
41 #endif
42 
43 /*
44  * Time-sharing class specific structures for the priocntl system call.
45  */
46 
47 typedef struct tsparms {
48 	pri_t	ts_uprilim;	/* user priority limit */
49 	pri_t	ts_upri;	/* user priority */
50 } tsparms_t;
51 
52 
53 typedef struct tsinfo {
54 	pri_t	ts_maxupri;	/* configured limits of user priority range */
55 } tsinfo_t;
56 
57 #define	TS_NOCHANGE	-32768
58 
59 /*
60  * Time-sharing class specific keys for the priocntl system call
61  * varargs interface.
62  */
63 #define	TS_KY_UPRILIM	1	/* user priority limit */
64 #define	TS_KY_UPRI	2	/* user priority */
65 
66 /*
67  * The following is used by the dispadmin(1M) command for
68  * scheduler administration and is not for general use.
69  */
70 
71 #ifdef _SYSCALL32
72 /* Data structure for ILP32 clients */
73 typedef struct tsadmin32 {
74 	caddr32_t	ts_dpents;
75 	int16_t		ts_ndpents;
76 	int16_t		ts_cmd;
77 } tsadmin32_t;
78 #endif /* _SYSCALL32 */
79 
80 typedef struct tsadmin {
81 	struct tsdpent	*ts_dpents;
82 	short		ts_ndpents;
83 	short		ts_cmd;
84 } tsadmin_t;
85 
86 #define	TS_GETDPSIZE	1
87 #define	TS_GETDPTBL	2
88 #define	TS_SETDPTBL	3
89 
90 #ifdef	__cplusplus
91 }
92 #endif
93 
94 #endif	/* _SYS_TSPRIOCNTL_H */
95