shell: use k_thread_create()

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2017-05-09 12:18:56 -07:00 committed by Anas Nashif
commit 77d1f1d232

View file

@ -44,7 +44,8 @@ static char default_module_prompt[PROMPT_MAX_LEN];
static int default_module = -1;
#define STACKSIZE CONFIG_CONSOLE_SHELL_STACKSIZE
static char __stack stack[STACKSIZE];
static char __noinit __stack stack[STACKSIZE];
static struct k_thread shell_thread;
#define MAX_CMD_QUEUED CONFIG_CONSOLE_SHELL_MAX_CMD_QUEUED
static struct console_input buf[MAX_CMD_QUEUED];
@ -522,8 +523,8 @@ void shell_init(const char *str)
prompt = str ? str : "";
k_thread_spawn(stack, STACKSIZE, shell, NULL, NULL, NULL,
K_PRIO_COOP(7), 0, K_NO_WAIT);
k_thread_create(&shell_thread, stack, STACKSIZE, shell, NULL, NULL,
NULL, K_PRIO_COOP(7), 0, K_NO_WAIT);
/* Register serial console handler */
#ifdef CONFIG_UART_CONSOLE