summaryrefslogtreecommitdiff
path: root/kern/sref_i.h
diff options
context:
space:
mode:
Diffstat (limited to 'kern/sref_i.h')
-rw-r--r--kern/sref_i.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/kern/sref_i.h b/kern/sref_i.h
index 5b63857f..09dbbfa8 100644
--- a/kern/sref_i.h
+++ b/kern/sref_i.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2017 Richard Braun.
+ * Copyright (c) 2014-2018 Richard Braun.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,6 +20,7 @@
#include <stdint.h>
+#include <kern/slist.h>
#include <kern/spinlock.h>
#include <kern/work.h>
@@ -44,15 +45,17 @@ struct sref_weakref {
/*
* Scalable reference counter.
*
- * It's tempting to merge the flags into the next member, but since they're
+ * 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.
*/
struct sref_counter {
sref_noref_fn_t noref_fn;
union {
struct {
- struct sref_counter *next;
+ struct slist_node node;
struct spinlock lock;
int flags;
unsigned long value;