diff --git a/bsp/raspberry-pi/raspi4-64/.config b/bsp/raspberry-pi/raspi4-64/.config index 64afe4a82af63603d838e836a4365729074e4b23..39180551f5d894369ccfd45da75cb0df239ba222 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 b19321dafb7426f632fee7fe5cf787358e5a2be9..62ab56578bd71ccbe6d76ac6cb7354e746bd3899 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 bb17d740b5e6c09b91f52b4e6a5528c78d6a83d9..9e1609000d44bf6d444345bc88c049577812cbb7 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 8894f817c0cdb626e27b96f77c0027227a816813..e310ef1906c61cbf968370617dd4d5a48fd31f0f 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;