diff options
| author | Bernard Xiong <[email protected]> | 2019-05-12 21:48:54 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2019-05-12 21:48:54 +0800 |
| commit | 7038465d13531ba26f16d1b402974bfef3f93115 (patch) | |
| tree | a852b4f8f2410dc3bdf50b18f5680b1af935e3e3 /components/libc | |
| parent | bb506e8493b3918a36b4854632e177b4b64f30fe (diff) | |
[pthreads] Add PTHREAD_NUM_MAX in Kconfig.
Diffstat (limited to 'components/libc')
| -rw-r--r-- | components/libc/Kconfig | 6 | ||||
| -rw-r--r-- | components/libc/pthreads/pthread_internal.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/components/libc/Kconfig b/components/libc/Kconfig index b2abe69850..43d9330102 100644 --- a/components/libc/Kconfig +++ b/components/libc/Kconfig @@ -8,6 +8,12 @@ config RT_USING_PTHREADS bool "Enable pthreads APIs" default n +if RT_USING_PTHREADS + config PTHREAD_NUM_MAX + int "Maximum number of pthreads" + default 8 +endif + if RT_USING_LIBC && RT_USING_DFS config RT_USING_POSIX bool "Enable POSIX layer for poll/select, stdin etc" diff --git a/components/libc/pthreads/pthread_internal.h b/components/libc/pthreads/pthread_internal.h index 304701584f..a6706ca091 100644 --- a/components/libc/pthreads/pthread_internal.h +++ b/components/libc/pthreads/pthread_internal.h @@ -30,7 +30,10 @@ struct _pthread_key_data }; typedef struct _pthread_key_data _pthread_key_data_t; +#ifndef PTHREAD_NUM_MAX #define PTHREAD_NUM_MAX 32 +#endif + #define PTHREAD_MAGIC 0x70746873 struct _pthread_data { |
