diff options
| author | Shell <[email protected]> | 2024-04-09 21:36:16 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-04-09 21:36:16 +0800 |
| commit | 4b0f42c24aad9c824fb98a3bb4c7cc2fd29b632a (patch) | |
| tree | acbfb3c1ef799a4e1d48947d435f44e11fa4cbdd /components/lwp | |
| parent | 38204386b3c5db7412572adb75038badc4cef6d2 (diff) | |
[drivers/serial] Introduce hooker for TTY (#8733)
In this patch, a hook list has been introduced to address the concerns
regarding coupling issues arising from modifications to the serial code
for integrating TTY logic.
Signed-off-by: Shell <[email protected]>
Diffstat (limited to 'components/lwp')
| -rw-r--r-- | components/lwp/Kconfig | 9 | ||||
| -rw-r--r-- | components/lwp/lwp.c | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/components/lwp/Kconfig b/components/lwp/Kconfig index 9b79e51207..16b23c4dd7 100644 --- a/components/lwp/Kconfig +++ b/components/lwp/Kconfig @@ -6,10 +6,17 @@ menuconfig RT_USING_LWP The lwP is a light weight process running in user mode. if RT_USING_LWP - config LWP_DEBUG + menuconfig LWP_DEBUG bool "Enable debugging features of LwP" default y + if LWP_DEBUG + config LWP_DEBUG_INIT + select RT_USING_HOOKLIST + bool "Enable debug mode of init process" + default n + endif + config RT_LWP_MAX_NR int "The max number of light-weight process" default 30 diff --git a/components/lwp/lwp.c b/components/lwp/lwp.c index 27d9f2f234..f923c91817 100644 --- a/components/lwp/lwp.c +++ b/components/lwp/lwp.c @@ -137,7 +137,7 @@ static int lwp_startup(void) char *argv[] = {0, "&"}; char *envp[] = {LWP_CONSOLE_PATH, 0}; -#ifdef LWP_DEBUG +#ifdef LWP_DEBUG_INIT int command; int countdown = LATENCY_TIMES; while (countdown) @@ -152,7 +152,7 @@ static int lwp_startup(void) rt_thread_mdelay(LATENCY_IN_MSEC); } rt_kprintf("Starting init ...\n"); -#endif +#endif /* LWP_DEBUG_INIT */ for (size_t i = 0; i < sizeof(init_search_path)/sizeof(init_search_path[0]); i++) { |
