You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/01/25 17:26:17 UTC
[nuttx] branch master updated: sched/pthread: restore C89 compliance in pthread_create
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 5f55290e41 sched/pthread: restore C89 compliance in pthread_create
5f55290e41 is described below
commit 5f55290e41fd2388c82e1b83ff283e4697158c59
Author: Petro Karashchenko <pe...@gmail.com>
AuthorDate: Wed Jan 25 17:37:28 2023 +0200
sched/pthread: restore C89 compliance in pthread_create
Signed-off-by: Petro Karashchenko <pe...@gmail.com>
---
sched/pthread/pthread_create.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sched/pthread/pthread_create.c b/sched/pthread/pthread_create.c
index 6ff3292085..88a87c5ad1 100644
--- a/sched/pthread/pthread_create.c
+++ b/sched/pthread/pthread_create.c
@@ -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)