mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-10 05:27:01 +03:00
optimize telnet, stacks and threads
This commit is contained in:
@@ -297,11 +297,10 @@ void initialize_console() {
|
||||
xRingbufferAddToQueueSetRead(stdin_redir.handle, stdin_redir.queue_set);
|
||||
xQueueAddToSet(uart_queue, stdin_redir.queue_set);
|
||||
|
||||
const esp_vfs_t vfs = {
|
||||
.flags = ESP_VFS_FLAG_DEFAULT,
|
||||
.open = stdin_dummy,
|
||||
.read = stdin_read,
|
||||
};
|
||||
esp_vfs_t vfs = { };
|
||||
vfs.flags = ESP_VFS_FLAG_DEFAULT;
|
||||
vfs.open = stdin_dummy;
|
||||
vfs.read = stdin_read;
|
||||
|
||||
ESP_ERROR_CHECK(esp_vfs_register("/dev/console", &vfs, NULL));
|
||||
freopen("/dev/console", "r", stdin);
|
||||
@@ -398,9 +397,9 @@ void console_start() {
|
||||
esp_pthread_cfg_t cfg = esp_pthread_get_default_config();
|
||||
cfg.thread_name= "console";
|
||||
cfg.inherit_cfg = true;
|
||||
cfg.stack_size = 4*1024;
|
||||
if(is_recovery_running){
|
||||
prompt = recovery_prompt;
|
||||
cfg.stack_size = 4096 ;
|
||||
}
|
||||
esp_pthread_set_cfg(&cfg);
|
||||
pthread_create(&thread_console, NULL, console_thread, NULL);
|
||||
|
||||
Reference in New Issue
Block a user