mirror of
https://github.com/apache/nuttx.git
synced 2026-05-20 12:33:27 +08:00
include/sys/select.h: Define __SELECT_NUINT32 in generic way
Support defining OPEN_MAX freely to allow increasing it from 256 Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
committed by
Xiang Xiao
parent
0e87a475d3
commit
c3fd827ae1
+1
-19
@@ -49,25 +49,7 @@
|
||||
* many uint32_t's do we need to span all descriptors?
|
||||
*/
|
||||
|
||||
#if FD_SETSIZE <= 32
|
||||
# define __SELECT_NUINT32 1
|
||||
#elif FD_SETSIZE <= 64
|
||||
# define __SELECT_NUINT32 2
|
||||
#elif FD_SETSIZE <= 96
|
||||
# define __SELECT_NUINT32 3
|
||||
#elif FD_SETSIZE <= 128
|
||||
# define __SELECT_NUINT32 4
|
||||
#elif FD_SETSIZE <= 160
|
||||
# define __SELECT_NUINT32 5
|
||||
#elif FD_SETSIZE <= 192
|
||||
# define __SELECT_NUINT32 6
|
||||
#elif FD_SETSIZE <= 224
|
||||
# define __SELECT_NUINT32 7
|
||||
#elif FD_SETSIZE <= 256
|
||||
# define __SELECT_NUINT32 8
|
||||
#else
|
||||
# warning "Larger fd_set needed"
|
||||
#endif
|
||||
#define __SELECT_NUINT32 ((FD_SETSIZE + 31) / 32)
|
||||
|
||||
/* These macros map a file descriptor to an index and bit number */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user