sched: inherit parent priority by default, except idle
Signed-off-by: yangyalei <yangyalei@xiaomi.com> asdfas Signed-off-by: yangyalei <yangyalei@xiaomi.com>
This commit is contained in:
parent
3721af647a
commit
30367fd4cd
1 changed files with 6 additions and 2 deletions
|
|
@ -196,9 +196,13 @@ int nx_pthread_create(pthread_trampoline_t trampoline, FAR pthread_t *thread,
|
|||
|
||||
if (!attr)
|
||||
{
|
||||
/* Inherit parent priority by default */
|
||||
/* Inherit parent priority by default. except idle */
|
||||
|
||||
if (!is_idle_task(parent))
|
||||
{
|
||||
default_attr.priority = parent->sched_priority;
|
||||
}
|
||||
|
||||
default_attr.priority = parent->sched_priority;
|
||||
attr = &default_attr;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue