summaryrefslogtreecommitdiff
path: root/kern/llsync.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-01-26 23:17:52 +0100
committerRichard Braun <rbraun@sceen.net>2017-01-26 23:17:52 +0100
commit29c9d176f0ac8854ec29dc1c586bd53ddc3d7553 (patch)
treef4799382a67be8d868ba28969c0d1ee13a2c2838 /kern/llsync.c
parent7f32abc5bb79a3aa920b9468d4c6f391c497b2ad (diff)
kern/{llsync,rdxtree}: don't use llsync until it's ready
Diffstat (limited to 'kern/llsync.c')
-rw-r--r--kern/llsync.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/kern/llsync.c b/kern/llsync.c
index db356ff1..6859f59e 100644
--- a/kern/llsync.c
+++ b/kern/llsync.c
@@ -32,6 +32,8 @@
* TODO Gracefully handle large amounts of deferred works.
*/
+#include <stdbool.h>
+
#include <kern/assert.h>
#include <kern/condition.h>
#include <kern/cpumap.h>
@@ -73,6 +75,14 @@ struct llsync_waiter {
int done;
};
+static bool llsync_is_ready __read_mostly = false;
+
+bool
+llsync_ready(void)
+{
+ return llsync_is_ready;
+}
+
void __init
llsync_setup(void)
{
@@ -94,6 +104,8 @@ llsync_setup(void)
cpu_data = percpu_ptr(llsync_cpu_data, i);
work_queue_init(&cpu_data->queue0);
}
+
+ llsync_is_ready = true;
}
static void