summaryrefslogtreecommitdiff
path: root/kern/sref.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-02-06 20:45:24 +0100
committerRichard Braun <rbraun@sceen.net>2018-02-07 01:08:53 +0100
commit6db72a1aeaddf038b12490fe9310a10693ffbf7a (patch)
treebe5ffafd3cb11afce2dbddf7f25629e042cca21e /kern/sref.h
parentc302412778d43f1ed6223349911013d43eadfdcd (diff)
kern/sref: allow usage from interrupt context
Diffstat (limited to 'kern/sref.h')
-rw-r--r--kern/sref.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/kern/sref.h b/kern/sref.h
index 768f1eea..9cee283f 100644
--- a/kern/sref.h
+++ b/kern/sref.h
@@ -87,7 +87,9 @@ void sref_counter_init(struct sref_counter *counter,
/*
* Counter operations.
*
- * These functions may safely be called with preemption disabled.
+ * These functions may safely be called in interrupt context.
+ *
+ * These functions imply a compiler barrier.
*/
void sref_counter_inc(struct sref_counter *counter);
void sref_counter_dec(struct sref_counter *counter);
@@ -98,7 +100,7 @@ void sref_counter_dec(struct sref_counter *counter);
* If successful, increment the reference counter before returning it.
* Otherwise return NULL.
*
- * This function may safely be called with preemption disabled.
+ * This function may safely be called in interrupt context.
*/
struct sref_counter * sref_weakref_get(struct sref_weakref *weakref);