xref: /illumos-gate/usr/src/head/rctl.h (revision eb6b10e69fa5ba733da194d3ad71a0e63338be29)
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	_RCTL_H
28 #define	_RCTL_H
29 
30 #include <sys/rctl.h>
31 #include <sys/types.h>
32 
33 #ifdef	__cplusplus
34 extern "C" {
35 #endif
36 
37 int rctl_walk(int (*)(const char *, void *), void *);
38 
39 hrtime_t rctlblk_get_firing_time(rctlblk_t *);
40 uint_t rctlblk_get_global_action(rctlblk_t *);
41 uint_t rctlblk_get_global_flags(rctlblk_t *);
42 uint_t rctlblk_get_local_action(rctlblk_t *, int *);
43 uint_t rctlblk_get_local_flags(rctlblk_t *);
44 id_t rctlblk_get_recipient_pid(rctlblk_t *);
45 rctl_priv_t rctlblk_get_privilege(rctlblk_t *);
46 rctl_qty_t rctlblk_get_value(rctlblk_t *);
47 rctl_qty_t rctlblk_get_enforced_value(rctlblk_t *);
48 
49 void rctlblk_set_local_action(rctlblk_t *, uint_t, int);
50 void rctlblk_set_local_flags(rctlblk_t *, uint_t);
51 void rctlblk_set_recipient_pid(rctlblk_t *, id_t);
52 void rctlblk_set_privilege(rctlblk_t *, rctl_priv_t);
53 void rctlblk_set_value(rctlblk_t *, rctl_qty_t);
54 
55 size_t rctlblk_size(void);
56 
57 #ifdef	__cplusplus
58 }
59 #endif
60 
61 #endif	/* _RCTL_H */
62