Skip to content

Commit

Permalink
common/shutdown.cpp: Start user worker for CONFIG_BUILD_KERNEL
Browse files Browse the repository at this point in the history
The userspace work queue is not started automatically by the system,
so start it when dispatching the shutdown command.

It would be best if there was an init function for shutdown.cpp but this
"lazy" init is just fine too.
  • Loading branch information
pussuw committed Aug 10, 2023
1 parent 8fa5ff8 commit 0754659
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions platforms/common/shutdown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,11 @@ int px4_reboot_request(bool to_bootloader, uint32_t delay_us)
return 0;
}

#ifdef CONFIG_BUILD_KERNEL
// Must start the worker as it is not automatically started by the system
work_usrstart();
#endif

shutdown_args |= SHUTDOWN_ARG_REBOOT;

if (to_bootloader) {
Expand Down

0 comments on commit 0754659

Please sign in to comment.