blob: c1ebc6864dbf2e29e3ac1c2b8f6fd0bd4998619f [file] [log] [blame]
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -07001/*
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
stevel@tonic-gate7c478bd2005-06-14 00:00:00 -070030#include <sys/rctl.h>
31#include <sys/types.h>
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37int rctl_walk(int (*)(const char *, void *), void *);
38
39hrtime_t rctlblk_get_firing_time(rctlblk_t *);
40uint_t rctlblk_get_global_action(rctlblk_t *);
41uint_t rctlblk_get_global_flags(rctlblk_t *);
42uint_t rctlblk_get_local_action(rctlblk_t *, int *);
43uint_t rctlblk_get_local_flags(rctlblk_t *);
44id_t rctlblk_get_recipient_pid(rctlblk_t *);
45rctl_priv_t rctlblk_get_privilege(rctlblk_t *);
46rctl_qty_t rctlblk_get_value(rctlblk_t *);
47rctl_qty_t rctlblk_get_enforced_value(rctlblk_t *);
48
49void rctlblk_set_local_action(rctlblk_t *, uint_t, int);
50void rctlblk_set_local_flags(rctlblk_t *, uint_t);
51void rctlblk_set_recipient_pid(rctlblk_t *, id_t);
52void rctlblk_set_privilege(rctlblk_t *, rctl_priv_t);
53void rctlblk_set_value(rctlblk_t *, rctl_qty_t);
54
55size_t rctlblk_size(void);
56
57#ifdef __cplusplus
58}
59#endif
60
61#endif /* _RCTL_H */