sched/pthread: restore C89 compliance in pthread_create

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko 2023-01-25 17:37:28 +02:00 committed by Xiang Xiao
parent c05cdd6598
commit 5f55290e41

View File

@ -189,6 +189,7 @@ int nx_pthread_create(pthread_trampoline_t trampoline, FAR pthread_t *thread,
{
FAR struct pthread_tcb_s *ptcb;
struct sched_param param;
FAR struct tcb_s *parent;
int policy;
int errcode;
pid_t pid;
@ -472,7 +473,7 @@ int nx_pthread_create(pthread_trampoline_t trampoline, FAR pthread_t *thread,
* so it has the same priority as the parent thread.
*/
FAR struct tcb_s *parent = this_task();
parent = this_task();
DEBUGASSERT(parent != NULL);
if (ptcb->cmn.sched_priority < parent->sched_priority)