From ed705f9cb371caba68ff8f4e0d127ab0dc3916c7 Mon Sep 17 00:00:00 2001 From: yangyalei Date: Mon, 26 Jun 2023 10:39:32 +0800 Subject: [PATCH] sysconf: add _SC_THREAD_THREADS_MAX response fix ltp_pthread_create_s_c1 test get wrong PTHREAD_THREADS_MAX. Signed-off-by: yangyalei --- libs/libc/unistd/lib_sysconf.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/libc/unistd/lib_sysconf.c b/libs/libc/unistd/lib_sysconf.c index aab4950ef8..f0fde4bfe2 100644 --- a/libs/libc/unistd/lib_sysconf.c +++ b/libs/libc/unistd/lib_sysconf.c @@ -249,6 +249,11 @@ long sysconf(int name) case _SC_THREAD_STACK_MIN: return CONFIG_PTHREAD_STACK_MIN; + /* threads limit to tcb_s->group->tg_nmembers(unint_8) */ + + case _SC_THREAD_THREADS_MAX: + return UINT8_MAX; + default: #if 0 /* Assume valid but not implemented for the time being */ errcode = EINVAL;