dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / include / sys / pset.h
blob355c095d2b0a007c2728c8aa1736e6bcdd61de51
1 /*
2 * CDDL HEADER START
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.
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.
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]
19 * CDDL HEADER END
22 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
25 * Use is subject to license terms.
28 #ifndef _SYS_PSET_H
29 #define _SYS_PSET_H
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
35 #if !defined(_ASM)
37 #include <sys/types.h>
38 #include <sys/processor.h>
39 #include <sys/procset.h>
41 typedef int psetid_t;
43 /* special processor set id's */
44 #define PS_NONE -1
45 #define PS_QUERY -2
46 #define PS_MYID -3
47 #define PS_SOFT -4
48 #define PS_HARD -5
49 #define PS_QUERY_TYPE -6
51 /* types of processor sets */
52 #define PS_SYSTEM 1
53 #define PS_PRIVATE 2
55 #ifndef _KERNEL
57 extern int pset_create(psetid_t *);
58 extern int pset_destroy(psetid_t);
59 extern int pset_assign(psetid_t, processorid_t, psetid_t *);
60 extern int pset_info(psetid_t, int *, uint_t *, processorid_t *);
61 extern int pset_bind(psetid_t, idtype_t, id_t, psetid_t *);
62 extern int pset_bind_lwp(psetid_t, id_t, pid_t, psetid_t *);
63 extern int pset_getloadavg(psetid_t, double [], int);
64 extern int pset_list(psetid_t *, uint_t *);
65 extern int pset_setattr(psetid_t, uint_t);
66 extern int pset_getattr(psetid_t, uint_t *);
68 #endif /* ! _KERNEL */
70 #endif /* !defined(_ASM) */
72 /* system call subcodes */
73 #define PSET_CREATE 0
74 #define PSET_DESTROY 1
75 #define PSET_ASSIGN 2
76 #define PSET_INFO 3
77 #define PSET_BIND 4
78 #define PSET_GETLOADAVG 5
79 #define PSET_LIST 6
80 #define PSET_SETATTR 7
81 #define PSET_GETATTR 8
82 #define PSET_ASSIGN_FORCED 9
83 #define PSET_BIND_LWP 10
85 /* attribute bits */
86 #define PSET_NOESCAPE 0x0001
88 #ifdef __cplusplus
90 #endif
92 #endif /* _SYS_PSET_H */