summaryrefslogtreecommitdiffstats
path: root/common/Makefile
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2021-03-10 09:47:58 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2021-03-22 10:46:47 +0100
commit64242776de86d46d914aa8f3ab6cfee68420ca6a (patch)
tree33b339b551b65557d3f15c2af6e4beaae17da631 /common/Makefile
parent7ce21703892fac7084d417d296fc2723a85e7c10 (diff)
downloadbarebox-64242776de86d46d914aa8f3ab6cfee68420ca6a.tar.gz
barebox-64242776de86d46d914aa8f3ab6cfee68420ca6a.tar.xz
common: introduce bthreads, co-operative barebox threads
With the new setjmp/longjmp/initjmp support, we have all the architecture support in place to have suspendable green threads in barebox. These are expected to replace pollers and workqueues. For now we still have a differentiation between the main and secondary threads. The main thread is allowed I/O access unconditionally. If it's in a delay loop, a secondary thread running needs to be wary of not entering the same driver and doing hardware manipulation. We already have slices as mechanism to guard against this, but they aren't used as widely as needed. Preferably, in the end, threads will automatically yield until they can claim a resource (i.e. lock a mutex). Until we are there, take the same care when using bthreads as with pollers. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/Makefile')
-rw-r--r--common/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/Makefile b/common/Makefile
index 0e0ba384c9..c0b45d263e 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -50,6 +50,7 @@ obj-$(CONFIG_OFTREE) += oftree.o
obj-$(CONFIG_PARTITION_DISK) += partitions.o partitions/
obj-$(CONFIG_PASSWORD) += password.o
obj-$(CONFIG_POLLER) += poller.o
+obj-$(CONFIG_BTHREAD) += bthread.o
obj-$(CONFIG_RESET_SOURCE) += reset_source.o
obj-$(CONFIG_SHELL_HUSH) += hush.o
obj-$(CONFIG_SHELL_SIMPLE) += parser.o