summaryrefslogtreecommitdiffstats
path: root/src/include/thread.h
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2021-07-22 11:16:19 -0600
committerPatrick Georgi <pgeorgi@google.com>2021-07-26 07:28:33 +0000
commita2d83c68a3ea6f2017fa9eabda72dfbafae0fc37 (patch)
tree07b9f4cba9537dbbf4edfa4f0e565a6666b7e77c /src/include/thread.h
parent7db7ee984c7268b6a60eae051a919e428b2db988 (diff)
downloadcoreboot-a2d83c68a3ea6f2017fa9eabda72dfbafae0fc37.tar.gz
coreboot-a2d83c68a3ea6f2017fa9eabda72dfbafae0fc37.tar.bz2
coreboot-a2d83c68a3ea6f2017fa9eabda72dfbafae0fc37.zip
lib/thread,lib/hardwaremain: Lazy initialize threads
By lazy initializing the threads, if a stage doesn't use them, they will be garbage collected. BUG=b:179699789 TEST=Boot guybrush to the OS and verify threads worked Suggested-by: Julius Werner <jwerner@chromium.org> Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: I7208ffb5dcda63d916bc6cfdea28d92a62435da6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56532 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include/thread.h')
-rw-r--r--src/include/thread.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/include/thread.h b/src/include/thread.h
index ce250b8520af..3c06cc531102 100644
--- a/src/include/thread.h
+++ b/src/include/thread.h
@@ -51,8 +51,6 @@ struct thread {
struct thread_handle *handle;
};
-void threads_initialize(void);
-
/* Return 0 on successful yield, < 0 when thread did not yield. */
int thread_yield(void);
@@ -88,7 +86,6 @@ asmlinkage void switch_to_thread(uintptr_t new_stack, uintptr_t *saved_stack);
void arch_prepare_thread(struct thread *t,
asmlinkage void (*thread_entry)(void *), void *arg);
#else
-static inline void threads_initialize(void) {}
static inline int thread_yield(void)
{
return -1;