[pthreads] Add PTHREAD_NUM_MAX in Kconfig.

This commit is contained in:
Bernard Xiong 2019-05-12 21:48:54 +08:00
parent bb506e8493
commit 7038465d13
2 changed files with 9 additions and 0 deletions

View File

@ -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"

View File

@ -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
{