[coreboot-gerrit] New patch to review for coreboot: 386b7cb cooperative multitasking example
Aaron Durbin (adurbin@google.com)
gerrit at coreboot.org
Fri May 3 23:27:10 CEST 2013
Aaron Durbin (adurbin at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3193
-gerrit
commit 386b7cbf3b6211492f8c3d67cf36f657d149aef7
Author: Aaron Durbin <adurbin at chromium.org>
Date: Fri May 3 16:13:28 2013 -0500
cooperative multitasking example
Change-Id: I68c60f2cfd45f53bc1cd6b7b05d438762bc8f691
Signed-off-by: Aaron Durbin <adurbin at chromium.org>
---
src/lib/hardwaremain.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/src/lib/hardwaremain.c b/src/lib/hardwaremain.c
index 9f16e06..36eed75 100644
--- a/src/lib/hardwaremain.c
+++ b/src/lib/hardwaremain.c
@@ -496,3 +496,22 @@ void hardwaremain(int boot_complete)
die("Boot state machine failure.\n");
}
+static void test_thread(void *id)
+{
+ const char *str = id;
+ int i = 10;
+
+ while (i != 0) {
+ printk(BIOS_DEBUG, "mark from %s\n", str);
+ mdelay(5);
+ i--;
+ }
+}
+
+
+BOOT_STATE_INIT_ENTRIES(tests_threads) = {
+ BOOT_STATE_INIT_ENTRY_RAMSTAGE_EXIT(BS_PRE_DEVICE, BS_ON_ENTRY,
+ test_thread, (void *)"thread 0"),
+ BOOT_STATE_INIT_ENTRY_RAMSTAGE_EXIT(BS_PRE_DEVICE, BS_ON_ENTRY,
+ test_thread, (void *)"thread 1"),
+};
More information about the coreboot-gerrit
mailing list