Provide macros and extensions to the task spawn command to set the stack sizes right

This commit is contained in:
Lorenz Meier
2016-09-11 20:07:30 +02:00
parent efd64e2cd2
commit 5b69e58925
3 changed files with 12 additions and 6 deletions
@@ -202,7 +202,7 @@ px4_task_t px4_task_spawn_cmd(const char *name, int scheduler, int priority, int
fixed_stacksize = (fixed_stacksize < (size_t)stack_size) ? (size_t)stack_size : fixed_stacksize;
PX4_DEBUG("setting the thread[%s] stack size to[%d]", name, fixed_stacksize);
pthread_attr_setstacksize(&attr, fixed_stacksize);
pthread_attr_setstacksize(&attr, PX4_STACK_ADJUSTED(fixed_stacksize));
PX4_DEBUG("stack address after pthread_attr_setstacksize: 0x%X", attr.stackaddr);
param.sched_priority = priority;