mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-07-24 15:27:41 +08:00
The daemon server's client-handler thread spawns module tasks (e.g. dataman). Start px4::init_once()/init() before creating px4_daemon::Server so platform init - uORB, work queues, logging - completes with a happens-before edge to those tasks. Otherwise a module task racing the still-running init reads globals like uORB::Manager's instance pointer or the log message advertisement without synchronization (ThreadSanitizer flags it) - and an atomic would not make it correct, since the publication could simply be skipped.