shell: use k_thread_create()
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
27bcdc571b
commit
77d1f1d232
1 changed files with 4 additions and 3 deletions
|
@ -44,7 +44,8 @@ static char default_module_prompt[PROMPT_MAX_LEN];
|
||||||
static int default_module = -1;
|
static int default_module = -1;
|
||||||
|
|
||||||
#define STACKSIZE CONFIG_CONSOLE_SHELL_STACKSIZE
|
#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
|
#define MAX_CMD_QUEUED CONFIG_CONSOLE_SHELL_MAX_CMD_QUEUED
|
||||||
static struct console_input buf[MAX_CMD_QUEUED];
|
static struct console_input buf[MAX_CMD_QUEUED];
|
||||||
|
@ -522,8 +523,8 @@ void shell_init(const char *str)
|
||||||
|
|
||||||
prompt = str ? str : "";
|
prompt = str ? str : "";
|
||||||
|
|
||||||
k_thread_spawn(stack, STACKSIZE, shell, NULL, NULL, NULL,
|
k_thread_create(&shell_thread, stack, STACKSIZE, shell, NULL, NULL,
|
||||||
K_PRIO_COOP(7), 0, K_NO_WAIT);
|
NULL, K_PRIO_COOP(7), 0, K_NO_WAIT);
|
||||||
|
|
||||||
/* Register serial console handler */
|
/* Register serial console handler */
|
||||||
#ifdef CONFIG_UART_CONSOLE
|
#ifdef CONFIG_UART_CONSOLE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue