shell: Restore uninit_cb that was lost in #93154

The sh->ctx->uninit_cb needs to be set before posting the
SHELL_SIGNAL_KILL to the event, like the k_poll based code did prior to

Signed-off-by: Jeremy Bettis <jbettis@google.com>
This commit is contained in:
Jeremy Bettis 2025-07-24 16:40:16 -06:00 committed by Fabio Baltieri
parent c14a756cc0
commit aab1dc6858

View File

@ -1393,6 +1393,7 @@ void shell_uninit(const struct shell *sh, shell_uninit_cb_t cb)
__ASSERT_NO_MSG(sh); __ASSERT_NO_MSG(sh);
if (IS_ENABLED(CONFIG_MULTITHREADING)) { if (IS_ENABLED(CONFIG_MULTITHREADING)) {
sh->ctx->uninit_cb = cb;
k_event_post(&sh->ctx->signal_event, SHELL_SIGNAL_KILL); k_event_post(&sh->ctx->signal_event, SHELL_SIGNAL_KILL);
return; return;
} }