Merge commit '0b2e8253986c5c761129b58cfdac46d204903de1'
[unleashed.git] / include / rctl.h
blobc1ebc6864dbf2e29e3ac1c2b8f6fd0bd4998619f
1 /*
2 * CDDL HEADER START
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.
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.
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]
20 * CDDL HEADER END
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _RCTL_H
28 #define _RCTL_H
30 #include <sys/rctl.h>
31 #include <sys/types.h>
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
37 int rctl_walk(int (*)(const char *, void *), void *);
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 *);
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);
55 size_t rctlblk_size(void);
57 #ifdef __cplusplus
59 #endif
61 #endif /* _RCTL_H */