4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
29 #include <sys/types.h>
30 #include <sys/mutex.h>
31 #include <sys/param.h>
34 #include <sys/ksynch.h>
43 * The contents of this file are private to the implementation of
44 * Solaris and are subject to change at any time without notice.
45 * Applications and drivers using these interfaces may fail to
46 * run on future releases.
49 #define GLOBAL_ZONEID 0
50 #define ZONENAME_MAX 64
52 #if defined(_KERNEL) || defined(_FAKE_KERNEL)
56 typedef struct zone_ref
{
57 struct zone
*zref_zone
; /* the zone to which the reference refers */
58 list_node_t zref_linkage
; /* linkage for zone_t::zone_ref_list */
62 char *zone_name
; /* zone's configuration name */
63 zoneid_t zone_id
; /* ID of zone */
64 struct proc
*zone_zsched
; /* Dummy kernel "zsched" process */
65 time_t zone_boot_time
;
66 struct vnode
*zone_rootvp
; /* zone's root vnode */
67 char *zone_rootpath
; /* Path to zone's root + '/' */
72 extern zone_t
*global_zone
;
73 extern uint_t maxzones
;
76 * Zone-specific data (ZSD) APIs
79 * The following is what code should be initializing its zone_key_t to if it
80 * calls zone_getspecific() without necessarily knowing that zone_key_create()
81 * has been called on the key.
83 #define ZONE_KEY_UNINITIALIZED 0
85 typedef uint_t zone_key_t
;
87 extern void zone_key_create(zone_key_t
*, void *(*)(zoneid_t
),
88 void (*)(zoneid_t
, void *), void (*)(zoneid_t
, void *));
89 extern int zone_key_delete(zone_key_t
);
90 extern void *zone_getspecific(zone_key_t
, zone_t
*);
91 extern int zone_setspecific(zone_key_t
, zone_t
*, const void *);
93 extern zoneid_t
getzoneid(void);
95 #endif /* _KERNEL || _FAKE_KERNEL */
101 #endif /* _SYS_ZONE_H */