summaryrefslogtreecommitdiff
path: root/kern/sref.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2014-09-25 01:35:42 +0200
committerRichard Braun <rbraun@sceen.net>2014-09-25 01:35:42 +0200
commit8726f42dfbb0e7de221d1e9cedf50194ea5ad52f (patch)
treea846c5031e6d56160ab60735b4f083c7d7eace35 /kern/sref.c
parentfae32cacc67e0c8d32633b3095807e9c5f9368fc (diff)
kern/sref: don't inline sref_counter_init
Diffstat (limited to 'kern/sref.c')
-rw-r--r--kern/sref.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/kern/sref.c b/kern/sref.c
index e43f53aa..d139fcc5 100644
--- a/kern/sref.c
+++ b/kern/sref.c
@@ -862,6 +862,15 @@ sref_report_periodic_event(void)
}
void
+sref_counter_init(struct sref_counter *counter, sref_noref_fn_t noref_fn)
+{
+ counter->noref_fn = noref_fn;
+ spinlock_init(&counter->lock);
+ counter->flags = 0;
+ counter->value = 1;
+}
+
+void
sref_counter_inc(struct sref_counter *counter)
{
struct sref_cache *cache;