]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
uthreads: Make use of CONFIG_IS_ENABLED consistently
authorTom Rini <trini@konsulko.com>
Wed, 1 Oct 2025 20:30:50 +0000 (14:30 -0600)
committerJerome Forissier <jerome.forissier@linaro.org>
Wed, 22 Oct 2025 09:09:24 +0000 (11:09 +0200)
We do not yet support UTHREADS in xPL phases. However, we have the need
to dummy out certain functions so that xPL can build when full U-Boot
has UTHREADS enabled. Update the few places that need to use
CONFIG_IS_ENABLED so that we have the correct dummy in xPL.

Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
include/uthread.h
lib/Makefile

index 11a19aa9488298b08ea2ff23da63a4d6f611136b..78dab77f196f0f67ca36245c46d4017561e6c168 100644 (file)
@@ -72,7 +72,7 @@ struct uthread_mutex {
 
 #define UTHREAD_MUTEX_INITIALIZER { .state = UTHREAD_MUTEX_UNLOCKED }
 
-#ifdef CONFIG_UTHREAD
+#if CONFIG_IS_ENABLED(UTHREAD)
 
 /**
  * uthread_create() - Create a uthread object and make it ready for execution
@@ -184,5 +184,5 @@ static inline bool uthread_grp_done(unsigned int grp_id)
 #define uthread_mutex_trylock(_mutex) ({ 0 })
 #define uthread_mutex_unlock(_mutex) ({ 0; })
 
-#endif /* CONFIG_UTHREAD */
+#endif /* CONFIG_IS_ENABLED(UTHREAD) */
 #endif /* _UTHREAD_H_ */
index a2e6066886495502a47bb1595217e8eb82374763..07702cef7e7c19d2c0b5f785cf806c03f2b2ecff 100644 (file)
@@ -161,7 +161,7 @@ obj-$(CONFIG_LIB_ELF) += elf.o
 
 obj-$(CONFIG_$(PHASE_)SEMIHOSTING) += semihosting.o
 
-obj-$(CONFIG_UTHREAD) += uthread.o
+obj-$(CONFIG_$(PHASE_)UTHREAD) += uthread.o
 
 #
 # Build a fast OID lookup registry from include/linux/oid_registry.h