mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-23 04:04:15 +08:00
[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 <smokewood@qq.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user