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 #pragma ident "%Z%%M% %I% %E% SMI" 31 32 #include <sys/rctl.h> 33 #include <sys/types.h> 34 35 #ifdef __cplusplus 36 extern "C" { 37 #endif 38 39 int rctl_walk(int (*)(const char *, void *), void *); 40 41 hrtime_t rctlblk_get_firing_time(rctlblk_t *); 42 uint_t rctlblk_get_global_action(rctlblk_t *); 43 uint_t rctlblk_get_global_flags(rctlblk_t *); 44 uint_t rctlblk_get_local_action(rctlblk_t *, int *); 45 uint_t rctlblk_get_local_flags(rctlblk_t *); 46 id_t rctlblk_get_recipient_pid(rctlblk_t *); 47 rctl_priv_t rctlblk_get_privilege(rctlblk_t *); 48 rctl_qty_t rctlblk_get_value(rctlblk_t *); 49 rctl_qty_t rctlblk_get_enforced_value(rctlblk_t *); 50 51 void rctlblk_set_local_action(rctlblk_t *, uint_t, int); 52 void rctlblk_set_local_flags(rctlblk_t *, uint_t); 53 void rctlblk_set_recipient_pid(rctlblk_t *, id_t); 54 void rctlblk_set_privilege(rctlblk_t *, rctl_priv_t); 55 void rctlblk_set_value(rctlblk_t *, rctl_qty_t); 56 57 size_t rctlblk_size(void); 58 59 #ifdef __cplusplus 60 } 61 #endif 62 63 #endif /* _RCTL_H */ 64