xref: /titanic_41/usr/src/uts/common/sys/rctl_impl.h (revision 40cb5e5daa7b80bb70fcf8dadfb20f9281566331)
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	_SYS_RCTL_IMPL_H
28 #define	_SYS_RCTL_IMPL_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #include <sys/rctl.h>
33 #include <sys/time.h>
34 #include <sys/types.h>
35 
36 #ifdef	__cplusplus
37 extern "C" {
38 #endif
39 
40 #define	RCTLCTL_GET	0
41 #define	RCTLCTL_SET	1
42 
43 #ifndef _KERNEL
44 
45 extern int rctlctl(const char *, rctlblk_t *, int);
46 extern size_t rctllist(char *, size_t);
47 
48 #endif /* _KERNEL */
49 
50 typedef struct rctl_opaque {
51 	rctl_qty_t	rcq_value;
52 	rctl_qty_t	rcq_enforced_value;
53 	rctl_priv_t	rcq_privilege;
54 	int		rcq_global_flagaction;
55 	int		rcq_global_syslog_level;
56 	int		rcq_local_flagaction;
57 	int		rcq_local_signal;
58 	id_t		rcq_local_recipient_pid;
59 	hrtime_t	rcq_firing_time;
60 } rctl_opaque_t;
61 
62 extern uint_t rlim_fd_cur;
63 extern uint_t rlim_fd_max;
64 
65 #ifdef	__cplusplus
66 }
67 #endif
68 
69 #endif	/* _SYS_RCTL_IMPL_H */
70