From 4b626f60ec5c9ab5d07380b61e32c154df9e9e30 Mon Sep 17 00:00:00 2001 From: shaojinchun Date: Tue, 25 May 2021 13:42:14 +0800 Subject: [PATCH] =?UTF-8?q?aio=20stack=20size=E8=AE=BE=E7=BD=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E4=BD=BF=E7=94=A8kconfig=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/raspberry-pi/raspi4-64/.config | 1 + bsp/raspberry-pi/raspi4-64/rtconfig.h | 1 + components/libc/Kconfig | 5 +++++ components/libc/aio/posix_aio.c | 2 +- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bsp/raspberry-pi/raspi4-64/.config b/bsp/raspberry-pi/raspi4-64/.config index 64afe4a82a..39180551f5 100644 --- a/bsp/raspberry-pi/raspi4-64/.config +++ b/bsp/raspberry-pi/raspi4-64/.config @@ -215,6 +215,7 @@ CONFIG_RT_USING_POSIX_MMAP=y CONFIG_RT_USING_POSIX_TERMIOS=y # CONFIG_RT_USING_POSIX_GETLINE is not set CONFIG_RT_USING_POSIX_AIO=y +CONFIG_RT_POSIX_AIO_THREAD_STACK_SIZE=8192 CONFIG_RT_USING_POSIX_CLOCKTIME=y # CONFIG_RT_USING_MODULE is not set diff --git a/bsp/raspberry-pi/raspi4-64/rtconfig.h b/bsp/raspberry-pi/raspi4-64/rtconfig.h index b19321dafb..62ab56578b 100644 --- a/bsp/raspberry-pi/raspi4-64/rtconfig.h +++ b/bsp/raspberry-pi/raspi4-64/rtconfig.h @@ -138,6 +138,7 @@ #define RT_USING_POSIX_MMAP #define RT_USING_POSIX_TERMIOS #define RT_USING_POSIX_AIO +#define RT_POSIX_AIO_THREAD_STACK_SIZE 8192 #define RT_USING_POSIX_CLOCKTIME /* Network */ diff --git a/components/libc/Kconfig b/components/libc/Kconfig index bb17d740b5..9e1609000d 100644 --- a/components/libc/Kconfig +++ b/components/libc/Kconfig @@ -53,6 +53,11 @@ if RT_USING_LIBC && RT_USING_DFS bool "Enable AIO" default n + config RT_POSIX_AIO_THREAD_STACK_SIZE + int "Set posix aio thread stack size" + default 2048 + depends on RT_USING_POSIX_AIO + config RT_USING_POSIX_CLOCKTIME bool "Enable POSIX clock_time APIs" default n diff --git a/components/libc/aio/posix_aio.c b/components/libc/aio/posix_aio.c index 8894f817c0..e310ef1906 100644 --- a/components/libc/aio/posix_aio.c +++ b/components/libc/aio/posix_aio.c @@ -457,7 +457,7 @@ int lio_listio(int mode, struct aiocb * const list[], int nent, int aio_system_init(void) { - aio_queue = rt_workqueue_create("aio", 8192, RT_THREAD_PRIORITY_MAX/2); + aio_queue = rt_workqueue_create("aio", RT_POSIX_AIO_THREAD_STACK_SIZE, RT_THREAD_PRIORITY_MAX / 2); RT_ASSERT(aio_queue != NULL); return 0; -- Gitee