summaryrefslogtreecommitdiff
path: root/kern/sref.h
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.h
parentfae32cacc67e0c8d32633b3095807e9c5f9368fc (diff)
kern/sref: don't inline sref_counter_init
Diffstat (limited to 'kern/sref.h')
-rw-r--r--kern/sref.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/kern/sref.h b/kern/sref.h
index c854b9d2..3f6e39ad 100644
--- a/kern/sref.h
+++ b/kern/sref.h
@@ -31,8 +31,6 @@
#ifndef _KERN_SREF_H
#define _KERN_SREF_H
-#include <kern/spinlock.h>
-
struct sref_counter;
/*
@@ -88,17 +86,12 @@ void sref_report_periodic_event(void);
* The counter is set to 1. The no-reference function is called (from thread
* context) when it is certain that the true number of references is 0.
*/
-static inline 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_init(struct sref_counter *counter, sref_noref_fn_t noref_fn);
+/*
+ * Counter operations.
+ */
void sref_counter_inc(struct sref_counter *counter);
-
void sref_counter_dec(struct sref_counter *counter);
#endif /* _KERN_SREF_H */