File tree Expand file tree Collapse file tree 2 files changed +28
-24
lines changed Expand file tree Collapse file tree 2 files changed +28
-24
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,6 @@ extern "C" {
7979
8080#define _SYS_VFS_H
8181#define _SYS_SUNDDI_H
82- #define _SYS_CALLB_H
8382
8483#include <stdio.h>
8584#include <stdlib.h>
@@ -131,6 +130,7 @@ extern "C" {
131130#include <sys/systm.h>
132131#include <sys/misc.h>
133132#include <sys/random.h>
133+ #include <sys/callb.h>
134134
135135#include <sys/zfs_context_os.h>
136136
@@ -211,27 +211,6 @@ typedef off_t loff_t;
211211extern int highbit64 (uint64_t i );
212212extern int lowbit64 (uint64_t i );
213213
214- typedef struct callb_cpr {
215- kmutex_t * cc_lockp ;
216- } callb_cpr_t ;
217-
218- #define CALLB_CPR_INIT (cp , lockp , func , name ) { \
219- (cp)->cc_lockp = lockp; \
220- }
221-
222- #define CALLB_CPR_SAFE_BEGIN (cp ) { \
223- ASSERT(MUTEX_HELD((cp)->cc_lockp)); \
224- }
225-
226- #define CALLB_CPR_SAFE_END (cp , lockp ) { \
227- ASSERT(MUTEX_HELD((cp)->cc_lockp)); \
228- }
229-
230- #define CALLB_CPR_EXIT (cp ) { \
231- ASSERT(MUTEX_HELD((cp)->cc_lockp)); \
232- mutex_exit((cp)->cc_lockp); \
233- }
234-
235214#define zone_dataset_visible (x , y ) (1)
236215#define INGLOBALZONE (z ) (1)
237216extern uint32_t zone_get_hostid (void * zonep );
Original file line number Diff line number Diff line change 2121 * CDDL HEADER END
2222 */
2323/*
24- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
25- * Use is subject to license terms.
24+ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
25+ * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
26+ * Copyright (c) 2012, 2018 by Delphix. All rights reserved.
27+ * Copyright (c) 2012, Joyent, Inc. All rights reserved.
2628 */
2729
2830#ifndef _SYS_CALLB_H
2931#define _SYS_CALLB_H
3032
33+ #include <sys/mutex.h>
34+
35+ typedef struct callb_cpr {
36+ kmutex_t * cc_lockp ;
37+ } callb_cpr_t ;
38+
39+ #define CALLB_CPR_INIT (cp , lockp , func , name ) { \
40+ (cp)->cc_lockp = lockp; \
41+ }
42+
43+ #define CALLB_CPR_SAFE_BEGIN (cp ) { \
44+ ASSERT(MUTEX_HELD((cp)->cc_lockp)); \
45+ }
46+
47+ #define CALLB_CPR_SAFE_END (cp , lockp ) { \
48+ ASSERT(MUTEX_HELD((cp)->cc_lockp)); \
49+ }
50+
51+ #define CALLB_CPR_EXIT (cp ) { \
52+ ASSERT(MUTEX_HELD((cp)->cc_lockp)); \
53+ mutex_exit((cp)->cc_lockp); \
54+ }
55+
3156#endif
You can’t perform that action at this time.
0 commit comments