k_pipe: fix trace point for blocking writes

Fix the trace point in k_pipe wait_for.

Signed-off-by: Erik Tamlin <erik.tamlin@percepio.com>
This commit is contained in:
Erik Tamlin 2025-01-27 09:55:11 +01:00 committed by Benjamin Cabé
commit 07f5a6fa18

View file

@ -46,7 +46,11 @@ static int wait_for(_wait_q_t *waitq, struct k_pipe *pipe, k_spinlock_key_t *key
pipe->waiting++;
*need_resched = false;
SYS_PORT_TRACING_OBJ_FUNC_BLOCKING(k_pipe, read, pipe, timeout);
if (waitq == &pipe->space) {
SYS_PORT_TRACING_OBJ_FUNC_BLOCKING(k_pipe, write, pipe, timeout);
} else {
SYS_PORT_TRACING_OBJ_FUNC_BLOCKING(k_pipe, read, pipe, timeout);
}
rc = z_pend_curr(&pipe->lock, *key, waitq, timeout);
*key = k_spin_lock(&pipe->lock);
pipe->waiting--;