summaryrefslogtreecommitdiff
path: root/kern/sref_i.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-01-15 22:21:00 +0100
committerRichard Braun <rbraun@sceen.net>2018-01-15 22:21:00 +0100
commit8dd6b0932c84768b807a7fa642242b5caf7e1df8 (patch)
treefafb087a09adf79ef5ac24ffe8b09bd6b5d514df /kern/sref_i.h
parent440a0b8dfb88dde1490feeee56c603d2eac7add2 (diff)
kern/sref: document locking keys
Diffstat (limited to 'kern/sref_i.h')
-rw-r--r--kern/sref_i.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/kern/sref_i.h b/kern/sref_i.h
index 27f962c5..695808cc 100644
--- a/kern/sref_i.h
+++ b/kern/sref_i.h
@@ -51,17 +51,19 @@ struct sref_weakref {
* It's tempting to merge the flags into the node member, but since they're
* not protected by the same lock, store them separately.
*
- * TODO Locking keys.
+ * Locking keys :
+ * (c) sref_counter
+ * (g) sref_data
*/
struct sref_counter {
sref_noref_fn_t noref_fn;
union {
struct {
- struct slist_node node;
+ struct slist_node node; /* (g) */
struct spinlock lock;
- int flags;
- unsigned long value;
+ int flags; /* (c) */
+ unsigned long value; /* (c) */
struct sref_weakref *weakref;
};