corectl.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_CORECTL_H
#define _SYS_CORECTL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Definitions for corectl() system call.
*/
/* subcodes */
#define CC_SET_OPTIONS 1
#define CC_GET_OPTIONS 2
#define CC_SET_GLOBAL_PATH 3
#define CC_GET_GLOBAL_PATH 4
#define CC_SET_PROCESS_PATH 5
#define CC_GET_PROCESS_PATH 6
#define CC_SET_GLOBAL_CONTENT 7
#define CC_GET_GLOBAL_CONTENT 8
#define CC_SET_PROCESS_CONTENT 9
#define CC_GET_PROCESS_CONTENT 10
#define CC_SET_DEFAULT_PATH 11
#define CC_GET_DEFAULT_PATH 12
#define CC_SET_DEFAULT_CONTENT 13
#define CC_GET_DEFAULT_CONTENT 14
/* options */
/* all of the above */
#define CC_OPTIONS \
(CC_GLOBAL_PATH | CC_PROCESS_PATH | \
/* contents */
/* MAP_SHARED file mappings */
/* MAP_PRIVATE file mappings */
#define CC_CONTENT_ALL 0x1fffULL
#define CC_CONTENT_NONE 0ULL
#define CC_CONTENT_INVALID (-1ULL)
typedef u_longlong_t core_content_t;
typedef struct corectl_content {
typedef struct corectl_path {
#ifdef _KERNEL
struct core_globals {
};
extern zone_key_t core_zone_key;
extern void init_core(void);
extern void set_core_defaults(void);
extern void corectl_content_hold(corectl_content_t *);
extern void corectl_content_rele(corectl_content_t *);
extern void corectl_path_hold(corectl_path_t *);
extern void corectl_path_rele(corectl_path_t *);
#else /* _KERNEL */
extern int core_set_options(int);
extern int core_get_options(void);
extern int core_set_global_path(const char *, size_t);
extern int core_get_global_path(char *, size_t);
extern int core_set_default_path(const char *, size_t);
extern int core_get_default_path(char *, size_t);
extern int core_set_global_content(const core_content_t *);
extern int core_get_global_content(core_content_t *);
extern int core_set_default_content(const core_content_t *);
extern int core_get_default_content(core_content_t *);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_CORECTL_H */