mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 10:32:47 +08:00
fs: Map FD_SETSIZE to OPEN_MAX instead hardcoding 256
and change the default value of LIBC_OPEN_MAX to 256. Here has more discussion: https://www.mail-archive.com/dev@nuttx.apache.org/msg09095.html Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
9902f39d92
commit
fa3e0faffc
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdint.h>
|
||||
#include <signal.h>
|
||||
#include <sys/time.h>
|
||||
@@ -37,7 +38,7 @@
|
||||
|
||||
/* Get the total number of descriptors that we will have to support */
|
||||
|
||||
#define FD_SETSIZE 256
|
||||
#define FD_SETSIZE OPEN_MAX
|
||||
|
||||
/* We will use a 32-bit bitsets to represent the set of descriptors. How
|
||||
* many uint32_t's do we need to span all descriptors?
|
||||
|
||||
Reference in New Issue
Block a user