/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#ifndef _SYS_RCTL_H
#define _SYS_RCTL_H
#include <sys/resource.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Available local actions and flags.
*/
/*
* Available global actions and flags.
*/
/*
* getrctl(2) flag values
*/
/*
* setrctl(2) flag values
*/
/*
* rctl_priv_t: rctl privilege defined values
* A large amount of space has been deliberately left between these privileges
* to permit future enrichment of the control privilege value.
*/
typedef int rctl_priv_t;
typedef enum {
#ifndef _KERNEL
#else /* _KERNEL */
/*
* rctl_test return bitfield
*/
/*
* rctl_set_dup flags
*/
/*
* rctl_action/rctl_test action safety states
*/
typedef struct rctl_val {
} rctl_val_t;
typedef int rctl_hndl_t;
struct rctl;
struct proc;
struct task;
struct kproject;
struct zone;
struct kstat;
typedef struct rctl_entity_p_struct {
union {
} rcep_p;
typedef struct rctl_ops {
rctl_entity_p_t *);
} rctl_ops_t;
#define RCTLOP_TEST(r, p, e, v, i, f) \
/*
* Default resource control callback functions.
*/
#define RCTLOP_NO_USAGE(r) \
extern rctl_ops_t rctl_default_ops;
extern rctl_ops_t rctl_absolute_ops;
typedef struct rctl {
} rctl_t;
/*
* The rctl_set is the collection of resource controls associated with an
* individual entity within the system. All of the controls are applicable to
* the same entity, which we call out explicitly in rcs_entity.
*/
typedef struct rctl_set {
} rctl_set_t;
typedef struct rctl_dict_entry {
typedef struct rctl_alloc_gp {
extern rctl_hndl_t rctlproc_legacy[];
extern uint_t rctlproc_flags[];
extern int rctlproc_signals[];
void rctl_init(void);
void rctlproc_init(void);
rctl_qty_t, rctl_ops_t *);
rctl_hndl_t rctl_hndl_lookup(const char *);
rctl_dict_entry_t *rctl_dict_lookup(const char *);
void rctl_add_legacy_limit(const char *, const char *, const char *,
rctl_entity_p_t *, uint_t);
rctl_set_t *rctl_set_create(void);
rctl_set_t *, rctl_alloc_gp_t *);
void rctl_set_free(rctl_set_t *);
void rctl_prealloc_destroy(rctl_alloc_gp_t *);
size_t rctl_build_name_buf(char **);
struct proc *p);
struct proc *p);
struct proc *p);
/* tag declaration to appease the compiler */
struct cred;
rctl_alloc_gp_t *, int, int, const struct cred *);
/* specific rctl utility functions */
int);
int);
uchar_t);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_RCTL_H */