Skip to content

Commit 4dc6a0b

Browse files
Andy Rossnashif
authored andcommitted
kernel/poll: Remove dummy waitq from stack
The poll code uses a dummy wait queue so the threads have something to block on, but the previous coherence pass (which rearranged things to put the _poller data elsewhere) missed that this was on the stack, which is not allowed. It actually has no use except as a list, so make it a global static instead. Signed-off-by: Andy Ross <[email protected]>
1 parent 95bcba5 commit 4dc6a0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/poll.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ int z_impl_k_poll(struct k_poll_event *events, int num_events,
284284
return -EAGAIN;
285285
}
286286

287-
_wait_q_t wait_q = Z_WAIT_Q_INIT(&wait_q);
287+
static _wait_q_t wait_q = Z_WAIT_Q_INIT(&wait_q);
288288

289289
int swap_rc = z_pend_curr(&lock, key, &wait_q, timeout);
290290

0 commit comments

Comments
 (0)