Skip to content

Commit 71bf363

Browse files
teburdcarlescufi
authored andcommitted
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 <[email protected]>
1 parent f4a7d24 commit 71bf363

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

subsys/rtio/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,29 @@ if RTIO
88

99
config RTIO_SUBMIT_SEM
1010
bool "Use a semaphore when waiting for completions in rtio_submit"
11+
default n if !MULTITHREADING
12+
default y
1113
help
1214
When calling rtio_submit a semaphore is available to sleep the calling
1315
thread for each completion queue event until the wait count is met. This
1416
adds a small RAM overhead for a single semaphore. By default wait_for will
1517
use polling on the completion queue with a k_yield() in between iterations.
1618

19+
Enabled by default unless !MULTITHREADING
20+
1721
config RTIO_CONSUME_SEM
1822
bool "Use a semaphore when waiting for completions in rtio_cqe_consume_block"
23+
default n if !MULTITHREADING
24+
default y
1925
help
2026
When calling rtio_cqe_consume_block a semaphore is available to sleep the
2127
calling thread for each completion queue event until the wait count is met.
2228
This adds a small RAM overhead for a single semaphore. By default the call
2329
will use polling on the completion queue with a k_yield() in between
2430
iterations.
2531

32+
Enabled by default unless !MULTIHREADING
33+
2634
config RTIO_SYS_MEM_BLOCKS
2735
bool "Include system memory blocks as an optional backing read memory pool"
2836
select SYS_MEM_BLOCKS

0 commit comments

Comments
 (0)