Skip to content

Commit 7038465

Browse files
committed
[pthreads] Add PTHREAD_NUM_MAX in Kconfig.
1 parent bb506e8 commit 7038465

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

components/libc/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ config RT_USING_PTHREADS
88
bool "Enable pthreads APIs"
99
default n
1010

11+
if RT_USING_PTHREADS
12+
config PTHREAD_NUM_MAX
13+
int "Maximum number of pthreads"
14+
default 8
15+
endif
16+
1117
if RT_USING_LIBC && RT_USING_DFS
1218
config RT_USING_POSIX
1319
bool "Enable POSIX layer for poll/select, stdin etc"

components/libc/pthreads/pthread_internal.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ struct _pthread_key_data
3030
};
3131
typedef struct _pthread_key_data _pthread_key_data_t;
3232

33+
#ifndef PTHREAD_NUM_MAX
3334
#define PTHREAD_NUM_MAX 32
35+
#endif
36+
3437
#define PTHREAD_MAGIC 0x70746873
3538
struct _pthread_data
3639
{

0 commit comments

Comments
 (0)