summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
Diffstat (limited to 'kern')
-rw-r--r--kern/turnstile.c6
-rw-r--r--kern/turnstile.h9
2 files changed, 14 insertions, 1 deletions
diff --git a/kern/turnstile.c b/kern/turnstile.c
index 43629376..f5e94db5 100644
--- a/kern/turnstile.c
+++ b/kern/turnstile.c
@@ -500,14 +500,18 @@ turnstile_ctor(void *ptr)
}
void __init
-turnstile_setup(void)
+turnstile_bootstrap(void)
{
unsigned int i;
for (i = 0; i < ARRAY_SIZE(turnstile_htable); i++) {
turnstile_bucket_init(&turnstile_htable[i]);
}
+}
+void __init
+turnstile_setup(void)
+{
kmem_cache_init(&turnstile_cache, "turnstile", sizeof(struct turnstile),
CPU_L1_SIZE, turnstile_ctor, 0);
}
diff --git a/kern/turnstile.h b/kern/turnstile.h
index 21a5a1a9..4bc8f74d 100644
--- a/kern/turnstile.h
+++ b/kern/turnstile.h
@@ -101,6 +101,15 @@ turnstile_td_get_turnstile(const struct turnstile_td *td)
void turnstile_td_propagate_priority(struct turnstile_td *td);
/*
+ * Early initialization of the turnstile module.
+ *
+ * This module is initialized by architecture-specific code. It should
+ * be one of the first modules to be initialized since it's used by
+ * synchronization objects that may be accessed very early.
+ */
+void turnstile_bootstrap(void);
+
+/*
* Initialize the turnstile module.
*/
void turnstile_setup(void);