From bc02f576496b069c97ba4978a805cbde60badee1 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Tue, 16 Jul 2019 19:32:30 +0200 Subject: Document the scalable reference counter API --- kern/sref.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'kern') 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); -- cgit v1.2.3