From 71bf36387cfe1e2aa0fad3b2f94fc3662ccf1e3e Mon Sep 17 00:00:00 2001 From: Tom Burdick Date: Wed, 31 Jul 2024 10:51:10 -0500 Subject: [PATCH] rtio: Enable submit/consume semaphores by default The default behavior for thread pending of completions should use semaphores rather than yield/wait looping when multithreading is available. Disable by default only when multithreading isn't available. Signed-off-by: Tom Burdick --- subsys/rtio/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/subsys/rtio/Kconfig b/subsys/rtio/Kconfig index 15f4b24d83d..f1f7e018cbd 100644 --- a/subsys/rtio/Kconfig +++ b/subsys/rtio/Kconfig @@ -8,14 +8,20 @@ if RTIO config RTIO_SUBMIT_SEM bool "Use a semaphore when waiting for completions in rtio_submit" + default n if !MULTITHREADING + default y help When calling rtio_submit a semaphore is available to sleep the calling thread for each completion queue event until the wait count is met. This adds a small RAM overhead for a single semaphore. By default wait_for will use polling on the completion queue with a k_yield() in between iterations. + Enabled by default unless !MULTITHREADING + config RTIO_CONSUME_SEM bool "Use a semaphore when waiting for completions in rtio_cqe_consume_block" + default n if !MULTITHREADING + default y help When calling rtio_cqe_consume_block a semaphore is available to sleep the calling thread for each completion queue event until the wait count is met. @@ -23,6 +29,8 @@ config RTIO_CONSUME_SEM will use polling on the completion queue with a k_yield() in between iterations. + Enabled by default unless !MULTIHREADING + config RTIO_SYS_MEM_BLOCKS bool "Include system memory blocks as an optional backing read memory pool" select SYS_MEM_BLOCKS