This is an automated email from the ASF dual-hosted git repository.

ligd pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 4e386a955e1fe1e42ea9ec24f550ea9a9c40a2b4
Author: guohao15 <guoha...@xiaomi.com>
AuthorDate: Tue Nov 7 21:25:26 2023 +0800

    system/libuv: optimize stack usage
    
    Signed-off-by: guohao15 <guoha...@xiaomi.com>
---
 system/libuv/Kconfig  | 12 ++++++++++++
 system/libuv/Makefile |  3 +++
 2 files changed, 15 insertions(+)

diff --git a/system/libuv/Kconfig b/system/libuv/Kconfig
index 4070ae3d6..a28a87690 100644
--- a/system/libuv/Kconfig
+++ b/system/libuv/Kconfig
@@ -25,6 +25,18 @@ config LIBUV_BACKEND_EPOLL
        select FS_NOTIFY
        default y
 
+if LIBUV_BACKEND_EPOLL
+
+config LIBUV_MAX_EPOLL_EVENTS
+       int "libuv max epoll events"
+       default 64
+
+config LIBUV_PREP_EVENT_SIZE
+       int "libuv prep event size"
+       default 1
+
+endif
+
 choice
        prompt "libuv utils"
        default LIBUV_UTILS_NONE
diff --git a/system/libuv/Makefile b/system/libuv/Makefile
index 20e6e3f86..8914037f5 100644
--- a/system/libuv/Makefile
+++ b/system/libuv/Makefile
@@ -51,6 +51,9 @@ CFLAGS += -I$(LIBUV_UNPACK)/test
 CFLAGS += -Wno-shadow
 CFLAGS += -DDEF_THREADPOOL_SIZE=CONFIG_LIBUV_THREADPOOL_SIZE
 CFLAGS += -DDEF_THREADPOOL_STACKSIZE=CONFIG_LIBUV_THREAD_STACKSIZE
+CFLAGS += -DDEF_THREADPOOL_PRIORITY=CONFIG_LIBUV_THREADPOOL_PRIORITY
+CFLAGS += -DMAX_EPOLL_EVENTS=CONFIG_LIBUV_MAX_EPOLL_EVENTS
+CFLAGS += -DPREP_EVENT_SIZE=CONFIG_LIBUV_PREP_EVENT_SIZE
 
 ifeq ($(GCCVER),)
   export GCCVER = $(shell $(CC) --version | grep gcc | sed -r 's/.* 
([0-9]+\.[0-9]+).*/\1/' | cut -d'.' -f1)

Reply via email to