diff options
author | Richard Braun <rbraun@sceen.net> | 2019-07-16 19:32:30 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2019-08-16 03:57:13 +0200 |
commit | bc02f576496b069c97ba4978a805cbde60badee1 (patch) | |
tree | f9c3ca73f6076f7af09ddc88efae1cf4762ccefb | |
parent | 1ba03aabcdf4ebc126c19bf5f2d9e83f5015b6ad (diff) |
Document the scalable reference counter API
-rw-r--r-- | kern/sref.h | 8 |
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); |