mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-25 15:30:34 +08:00
UAVCAN: Initialize thread attributes correctly
This commit is contained in:
@@ -188,9 +188,12 @@ int UavcanServers::start(uavcan::INode &main_node)
|
||||
struct sched_param param;
|
||||
|
||||
pthread_attr_init(&tattr);
|
||||
(void)pthread_attr_getschedparam(&tattr, ¶m);
|
||||
tattr.stacksize = StackSize;
|
||||
param.sched_priority = Priority;
|
||||
pthread_attr_setschedparam(&tattr, ¶m);
|
||||
if (pthread_attr_setschedparam(&tattr, ¶m)) {
|
||||
warnx("setting sched params failed");
|
||||
}
|
||||
|
||||
static auto run_trampoline = [](void *) {return UavcanServers::_instance->run(_instance);};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user