summaryrefslogtreecommitdiffstats
path: root/src/include/thread.h
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2013-08-21 16:03:32 -0700
committerIsaac Christensen <isaac.christensen@se-eng.com>2014-08-07 23:55:15 +0200
commit34352d16a96b8096094274dddae98e37939857b9 (patch)
tree570575406d2dfe98d0d0e4b8e11ecabbf87b590e /src/include/thread.h
parent0ffa11bdbba48defc55cd38fb2aa2492ca2b5492 (diff)
downloadcoreboot-34352d16a96b8096094274dddae98e37939857b9.tar.gz
coreboot-34352d16a96b8096094274dddae98e37939857b9.tar.bz2
coreboot-34352d16a96b8096094274dddae98e37939857b9.zip
Possible thread stack implementation.
Architecture provides a function for thread stack base, thread code uses it. Build and boot tested on Falco with multitasking on and off. Change-Id: I5016fab47f9954379acf7702ac7965b0a70c88ed Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: https://gerrit.chromium.org/gerrit/66578 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Commit-Queue: Ronald G. Minnich <rminnich@chromium.org> Tested-by: Ronald G. Minnich <rminnich@chromium.org> (cherry picked from commit 3c6afef30c1a0ad6fba0fb76acc792184d924247) Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com> Reviewed-on: http://review.coreboot.org/6513 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Diffstat (limited to 'src/include/thread.h')
-rw-r--r--src/include/thread.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/thread.h b/src/include/thread.h
index 0522337429ad..306aad670b99 100644
--- a/src/include/thread.h
+++ b/src/include/thread.h
@@ -38,6 +38,11 @@ struct thread {
};
void threads_initialize(void);
+/* Get the base of the thread stacks.
+ * Returns pointer to CONFIG_NUM_THREADS*CONFIG_STACK_SIZE contiguous bytes
+ * aligned to CONFIG_STACK_SIZE, or NULL.
+ */
+void *arch_get_thread_stackbase(void);
/* Run func(arrg) on a new thread. Return 0 on successful start of thread, < 0
* when thread could not be started. Note that the thread will block the
* current state in the boot state machine until it is complete. */