summaryrefslogtreecommitdiff
path: root/kern/cpumap.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-07-13 20:07:07 +0200
committerRichard Braun <rbraun@sceen.net>2017-07-13 20:07:07 +0200
commitb2ad7d862388558556288877a65f2797528168f4 (patch)
tree4d3080abf0cbcca7c058cba5cad2ed71e5d5e1e5 /kern/cpumap.h
parentcacd797c0c1825301f21aab18a7ce2c410d14535 (diff)
Switch to initialization operations
Diffstat (limited to 'kern/cpumap.h')
-rw-r--r--kern/cpumap.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/kern/cpumap.h b/kern/cpumap.h
index 1843a99..fd07afc 100644
--- a/kern/cpumap.h
+++ b/kern/cpumap.h
@@ -27,6 +27,7 @@
#define _KERN_CPUMAP_H
#include <kern/bitmap.h>
+#include <kern/init.h>
struct cpumap {
BITMAP_DECLARE(cpus, X15_MAX_CPUS);
@@ -135,11 +136,6 @@ cpumap_find_first_zero(const struct cpumap *cpumap)
bitmap_for_each_zero((cpumap)->cpus, X15_MAX_CPUS, index)
/*
- * Initialize the cpumap module.
- */
-void cpumap_setup(void);
-
-/*
* Return a cpumap representing all active processors.
*
* Until the cpumap module is initialized, the cpumap returned by this
@@ -167,4 +163,11 @@ void cpumap_destroy(struct cpumap *cpumap);
*/
int cpumap_check(const struct cpumap *cpumap);
+/*
+ * This init operation provides :
+ * - cpumap creation
+ * - module fully initialized
+ */
+INIT_OP_DECLARE(cpumap_setup);
+
#endif /* _KERN_CPUMAP_H */