From 2fc02ec4a428c1d65dfd6d14dc936c00f1d1d7ec Mon Sep 17 00:00:00 2001 From: "chao.an" Date: Mon, 29 Jun 2020 11:23:01 +0800 Subject: [PATCH] sched/task_init: change the stack pointer type to (void *) change the stack pointer type from (uint32_t *) to (void *) Change-Id: I90bb7d6a9cb0184c133578a1a2ae9a19c233ad30 Signed-off-by: chao.an --- binfmt/binfmt_execmodule.c | 4 ++-- include/nuttx/sched.h | 2 +- sched/task/task_init.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/binfmt/binfmt_execmodule.c b/binfmt/binfmt_execmodule.c index 9c1ee0f246..c2764672be 100644 --- a/binfmt/binfmt_execmodule.c +++ b/binfmt/binfmt_execmodule.c @@ -117,7 +117,7 @@ int exec_module(FAR const struct binary_s *binp) #if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_BUILD_KERNEL) save_addrenv_t oldenv; #endif - FAR uint32_t *stack; + FAR void *stack; pid_t pid; int ret; @@ -157,7 +157,7 @@ int exec_module(FAR const struct binary_s *binp) * will need to change if/when we want to support dynamic stack allocation. */ - stack = (FAR uint32_t *)kumm_malloc(binp->stacksize); + stack = kumm_malloc(binp->stacksize); if (!stack) { ret = -ENOMEM; diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h index c7865f2f8d..ec545cc4cd 100644 --- a/include/nuttx/sched.h +++ b/include/nuttx/sched.h @@ -964,7 +964,7 @@ FAR struct socketlist *nxsched_get_sockets(void); ********************************************************************************/ int nxtask_init(FAR struct tcb_s *tcb, const char *name, int priority, - FAR uint32_t *stack, uint32_t stack_size, main_t entry, + FAR void *stack, uint32_t stack_size, main_t entry, FAR char * const argv[]); /******************************************************************************** diff --git a/sched/task/task_init.c b/sched/task/task_init.c index 1d0b2f75eb..3f1a27a75f 100644 --- a/sched/task/task_init.c +++ b/sched/task/task_init.c @@ -83,7 +83,7 @@ ****************************************************************************/ int nxtask_init(FAR struct tcb_s *tcb, const char *name, int priority, - FAR uint32_t *stack, uint32_t stack_size, + FAR void *stack, uint32_t stack_size, main_t entry, FAR char * const argv[]) { FAR struct task_tcb_s *ttcb = (FAR struct task_tcb_s *)tcb;