Skip to content

Commit 079d9c3

Browse files
teburdkartben
authored andcommitted
rtio: Transactions assume valid next list nodes
Add an assert ensuring programming errors where the executor code assumes there is a next node in the list for transaction/chained submissions. Signed-off-by: Tom Burdick <[email protected]>
1 parent 99fecb2 commit 079d9c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

subsys/rtio/rtio_executor.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ void rtio_executor_submit(struct rtio *r)
8484
"Expected chained or transaction flag, not both");
8585
#endif
8686
node = mpsc_pop(&iodev_sqe->r->sq);
87+
88+
__ASSERT(node != NULL,
89+
"Expected a valid submission in the queue while in a transaction or chain");
90+
8791
next = CONTAINER_OF(node, struct rtio_iodev_sqe, q);
8892

8993
/* If the current submission was cancelled before submit,

0 commit comments

Comments
 (0)