summaryrefslogtreecommitdiffstats
path: root/include/sys/refcount.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sys/refcount.h')
-rw-r--r--include/sys/refcount.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/sys/refcount.h b/include/sys/refcount.h
index 1752c64e3..e767a2389 100644
--- a/include/sys/refcount.h
+++ b/include/sys/refcount.h
@@ -50,15 +50,17 @@ typedef struct reference {
typedef struct refcount {
kmutex_t rc_mtx;
+ boolean_t rc_tracked;
list_t rc_list;
list_t rc_removed;
int64_t rc_count;
int64_t rc_removed_count;
} refcount_t;
-/* Note: refcount_t must be initialized with refcount_create() */
+/* Note: refcount_t must be initialized with refcount_create[_untracked]() */
void refcount_create(refcount_t *rc);
+void refcount_create_untracked(refcount_t *rc);
void refcount_destroy(refcount_t *rc);
void refcount_destroy_many(refcount_t *rc, uint64_t number);
int refcount_is_zero(refcount_t *rc);
@@ -79,6 +81,7 @@ typedef struct refcount {
} refcount_t;
#define refcount_create(rc) ((rc)->rc_count = 0)
+#define refcount_create_untracked(rc) ((rc)->rc_count = 0)
#define refcount_destroy(rc) ((rc)->rc_count = 0)
#define refcount_destroy_many(rc, number) ((rc)->rc_count = 0)
#define refcount_is_zero(rc) ((rc)->rc_count == 0)