xref: /titanic_51/usr/src/uts/common/sys/pset.h (revision 15d9d0b528387242011cdcc6190c9e598cfe3a07)
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 2004 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_SYS_PSET_H
28 #define	_SYS_PSET_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 #if !defined(_ASM)
37 
38 #include <sys/types.h>
39 #include <sys/processor.h>
40 #include <sys/procset.h>
41 
42 typedef int psetid_t;
43 
44 /* special processor set id's */
45 #define	PS_NONE		-1
46 #define	PS_QUERY	-2
47 #define	PS_MYID		-3
48 
49 /* types of processor sets */
50 #define	PS_SYSTEM	1
51 #define	PS_PRIVATE	2
52 
53 #ifndef	_KERNEL
54 #ifdef	__STDC__
55 
56 extern int	pset_create(psetid_t *);
57 extern int	pset_destroy(psetid_t);
58 extern int	pset_assign(psetid_t, processorid_t, psetid_t *);
59 extern int	pset_info(psetid_t, int *, uint_t *, processorid_t *);
60 extern int	pset_bind(psetid_t, idtype_t, id_t, psetid_t *);
61 extern int	pset_getloadavg(psetid_t, double [], int);
62 extern int	pset_list(psetid_t *, uint_t *);
63 extern int	pset_setattr(psetid_t, uint_t);
64 extern int	pset_getattr(psetid_t, uint_t *);
65 
66 #else
67 
68 extern int	pset_create();
69 extern int	pset_destroy();
70 extern int	pset_assign();
71 extern int	pset_info();
72 extern int	pset_bind();
73 extern int	pset_getloadavg();
74 extern int	pset_list();
75 extern int	pset_setattr();
76 extern int	pset_getattr();
77 
78 #endif	/* __STDC__ */
79 #endif	/* ! _KERNEL */
80 
81 #endif	/* !defined(_ASM) */
82 
83 /* system call subcodes */
84 #define	PSET_CREATE		0
85 #define	PSET_DESTROY		1
86 #define	PSET_ASSIGN		2
87 #define	PSET_INFO		3
88 #define	PSET_BIND		4
89 #define	PSET_GETLOADAVG		5
90 #define	PSET_LIST		6
91 #define	PSET_SETATTR		7
92 #define	PSET_GETATTR		8
93 #define	PSET_ASSIGN_FORCED	9
94 
95 /* attribute bits */
96 #define	PSET_NOESCAPE	0x0001
97 
98 #ifdef	__cplusplus
99 }
100 #endif
101 
102 #endif	/* _SYS_PSET_H */
103