summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2019-07-16 19:32:30 +0200
committerRichard Braun <rbraun@sceen.net>2019-08-16 03:57:13 +0200
commitbc02f576496b069c97ba4978a805cbde60badee1 (patch)
treef9c3ca73f6076f7af09ddc88efae1cf4762ccefb
parent1ba03aabcdf4ebc126c19bf5f2d9e83f5015b6ad (diff)
Document the scalable reference counter API
-rw-r--r--kern/sref.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/kern/sref.h b/kern/sref.h
index 942f3745..daaaa6d1 100644
--- a/kern/sref.h
+++ b/kern/sref.h
@@ -45,6 +45,11 @@ struct sref_weakref;
/*
* Type for no-reference functions.
+ *
+ * These functions implement no-reference operations.
+ *
+ * Prior decrement operations on a counter synchronize with the no-reference
+ * operation on the same counter.
*/
typedef void (*sref_noref_fn_t)(struct sref_counter *);
@@ -74,7 +79,8 @@ void sref_counter_init(struct sref_counter *counter,
*
* These functions may safely be called in interrupt context.
*
- * These functions imply a compiler barrier.
+ * Decrement operations on a counter synchronize with the no-reference
+ * operation on the same counter.
*/
void sref_counter_inc(struct sref_counter *counter);
void sref_counter_dec(struct sref_counter *counter);