[PATCH 2/4] introduce pure_initcall

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Fri Aug 27 01:15:16 EDT 2010


A "pure" initcall has no dependencies on anything else, and purely
initializes variables that couldn't be statically initialized.

This only exists for built-in code, not for modules.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 include/init.h |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/include/init.h b/include/init.h
index accc4d0..bc70874 100644
--- a/include/init.h
+++ b/include/init.h
@@ -14,10 +14,17 @@ typedef int (*initcall_t)(void);
 	__attribute__((__section__(".initcall." level))) = fn
 
 
-#define core_initcall(fn)		__define_initcall("0",fn,0)
-#define postcore_initcall(fn)		__define_initcall("1",fn,1)
-#define console_initcall(fn)		__define_initcall("2",fn,2)
-#define postconsole_initcall(fn)	__define_initcall("3",fn,3)
+/*
+ * A "pure" initcall has no dependencies on anything else, and purely
+ * initializes variables that couldn't be statically initialized.
+ *
+ * This only exists for built-in code, not for modules.
+ */
+#define pure_initcall(fn)		__define_initcall("0",fn,0)
+
+#define core_initcall(fn)		__define_initcall("1",fn,1)
+#define postcore_initcall(fn)		__define_initcall("2",fn,2)
+#define console_initcall(fn)		__define_initcall("3",fn,3)
 #define coredevice_initcall(fn)		__define_initcall("4",fn,4)
 #define fs_initcall(fn)			__define_initcall("5",fn,5)
 #define device_initcall(fn)		__define_initcall("6",fn,6)
-- 
1.7.1




More information about the barebox mailing list