Deleted Added
full compact
zfs_context.h (235222) zfs_context.h (240415)
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 (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 20 unchanged lines hidden (view full) ---

29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#define _SYS_MUTEX_H
34#define _SYS_RWLOCK_H
35#define _SYS_CONDVAR_H
36#define _SYS_SYSTM_H
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 (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 20 unchanged lines hidden (view full) ---

29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#define _SYS_MUTEX_H
34#define _SYS_RWLOCK_H
35#define _SYS_CONDVAR_H
36#define _SYS_SYSTM_H
37#define _SYS_DEBUG_H
38#define _SYS_T_LOCK_H
39#define _SYS_VNODE_H
40#define _SYS_VFS_H
41#define _SYS_SUNDDI_H
42#define _SYS_CALLB_H
43#define _SYS_SCHED_H_
44
45#include <solaris.h>

--- 24 unchanged lines hidden (view full) ---

70#include <sys/resource.h>
71#include <sys/byteorder.h>
72#include <sys/list.h>
73#include <sys/time.h>
74#include <sys/uio.h>
75#include <sys/mntent.h>
76#include <sys/mnttab.h>
77#include <sys/zfs_debug.h>
37#define _SYS_T_LOCK_H
38#define _SYS_VNODE_H
39#define _SYS_VFS_H
40#define _SYS_SUNDDI_H
41#define _SYS_CALLB_H
42#define _SYS_SCHED_H_
43
44#include <solaris.h>

--- 24 unchanged lines hidden (view full) ---

69#include <sys/resource.h>
70#include <sys/byteorder.h>
71#include <sys/list.h>
72#include <sys/time.h>
73#include <sys/uio.h>
74#include <sys/mntent.h>
75#include <sys/mnttab.h>
76#include <sys/zfs_debug.h>
78#include <sys/debug.h>
79#include <sys/sdt.h>
80#include <sys/kstat.h>
81#include <sys/u8_textprep.h>
82#include <sys/kernel.h>
83#include <sys/disk.h>
84#include <sys/sysevent.h>
85#include <sys/sysevent/eventdefs.h>
86#include <sys/sysevent/dev.h>
87#include <machine/atomic.h>
77#include <sys/sdt.h>
78#include <sys/kstat.h>
79#include <sys/u8_textprep.h>
80#include <sys/kernel.h>
81#include <sys/disk.h>
82#include <sys/sysevent.h>
83#include <sys/sysevent/eventdefs.h>
84#include <sys/sysevent/dev.h>
85#include <machine/atomic.h>
86#include <sys/debug.h>
88
89#define ZFS_EXPORTS_PATH "/etc/zfs/exports"
90
91/*
92 * Debugging
93 */
94
95/*

--- 23 unchanged lines hidden (view full) ---

119extern void vcmn_err(int, const char *, __va_list);
120extern void panic(const char *, ...);
121extern void vpanic(const char *, __va_list);
122
123#define fm_panic panic
124
125extern int aok;
126
87
88#define ZFS_EXPORTS_PATH "/etc/zfs/exports"
89
90/*
91 * Debugging
92 */
93
94/*

--- 23 unchanged lines hidden (view full) ---

118extern void vcmn_err(int, const char *, __va_list);
119extern void panic(const char *, ...);
120extern void vpanic(const char *, __va_list);
121
122#define fm_panic panic
123
124extern int aok;
125
127/* This definition is copied from assert.h. */
128#if defined(__STDC__)
129#if __STDC_VERSION__ - 0 >= 199901L
130#define zverify(EX) (void)((EX) || (aok) || \
131 (__assert(#EX, __FILE__, __LINE__), 0))
132#else
133#define zverify(EX) (void)((EX) || (aok) || \
134 (__assert(#EX, __FILE__, __LINE__), 0))
135#endif /* __STDC_VERSION__ - 0 >= 199901L */
136#else
137#define zverify(EX) (void)((EX) || (aok) || \
138 (_assert("EX", __FILE__, __LINE__), 0))
139#endif /* __STDC__ */
140
141
142#define VERIFY zverify
143#define ASSERT zverify
144#undef assert
145#define assert zverify
146
147extern void __assert(const char *, const char *, int);
148
149#ifdef lint
150#define VERIFY3_IMPL(x, y, z, t) if (x == z) ((void)0)
151#else
152/* BEGIN CSTYLED */
153#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE) do { \
154 const TYPE __left = (TYPE)(LEFT); \
155 const TYPE __right = (TYPE)(RIGHT); \
156 if (!(__left OP __right) && (!aok)) { \
157 char *__buf = alloca(256); \
158 (void) snprintf(__buf, 256, "%s %s %s (0x%llx %s 0x%llx)", \
159 #LEFT, #OP, #RIGHT, \
160 (u_longlong_t)__left, #OP, (u_longlong_t)__right); \
161 __assert(__buf, __FILE__, __LINE__); \
162 } \
163_NOTE(CONSTCOND) } while (0)
164/* END CSTYLED */
165#endif /* lint */
166
167#define VERIFY3S(x, y, z) VERIFY3_IMPL(x, y, z, int64_t)
168#define VERIFY3U(x, y, z) VERIFY3_IMPL(x, y, z, uint64_t)
169#define VERIFY3P(x, y, z) VERIFY3_IMPL(x, y, z, uintptr_t)
170
171#ifdef NDEBUG
172#define ASSERT3S(x, y, z) ((void)0)
173#define ASSERT3U(x, y, z) ((void)0)
174#define ASSERT3P(x, y, z) ((void)0)
175#else
176#define ASSERT3S(x, y, z) VERIFY3S(x, y, z)
177#define ASSERT3U(x, y, z) VERIFY3U(x, y, z)
178#define ASSERT3P(x, y, z) VERIFY3P(x, y, z)
179#endif
180
181/*
182 * DTrace SDT probes have different signatures in userland than they do in
183 * kernel. If they're being used in kernel code, re-define them out of
184 * existence for their counterparts in libzpool.
185 */
186
187#ifdef DTRACE_PROBE
188#undef DTRACE_PROBE

--- 506 unchanged lines hidden ---
126/*
127 * DTrace SDT probes have different signatures in userland than they do in
128 * kernel. If they're being used in kernel code, re-define them out of
129 * existence for their counterparts in libzpool.
130 */
131
132#ifdef DTRACE_PROBE
133#undef DTRACE_PROBE

--- 506 unchanged lines hidden ---