Commit df08c38c authored by Damien George's avatar Damien George

unix/modselect: Remove unix-specific implementation of select module.

The unix port has a custom select module which only works with objects that
have a file descriptor, eg files and sockets.  On the other hand, bare
metal ports use the common extmod/modselect.c implementation of the select
module that supports polling of arbitrary objects, as long as those objects
provide a MP_STREAM_POLL in their ioctl implementation (which can be done
in C or Python).

This commit removes the unix-specific code and makes unix use the common
one provided by extmod/modselect.c instead.  All objects with file
descriptors implement MP_STREAM_POLL so they continue to work.
Signed-off-by: default avatarDamien George <damien@micropython.org>
parent 22106bf2
...@@ -201,7 +201,6 @@ SRC_C += \ ...@@ -201,7 +201,6 @@ SRC_C += \
mpthreadport.c \ mpthreadport.c \
input.c \ input.c \
modmachine.c \ modmachine.c \
modselect.c \
alloc.c \ alloc.c \
fatfs_port.c \ fatfs_port.c \
mpbthciport.c \ mpbthciport.c \
......
This diff is collapsed.
...@@ -106,14 +106,8 @@ ...@@ -106,14 +106,8 @@
#define MICROPY_PY_CRYPTOLIB (1) #define MICROPY_PY_CRYPTOLIB (1)
#endif #endif
// Use the posix implementation of the "select" module (unless the variant // The "select" module is enabled by default, but disable select.select().
// specifically asks for the MicroPython version). #define MICROPY_PY_SELECT_SELECT (0)
#ifndef MICROPY_PY_SELECT
#define MICROPY_PY_SELECT (0)
#endif
#ifndef MICROPY_PY_SELECT_POSIX
#define MICROPY_PY_SELECT_POSIX (!MICROPY_PY_SELECT)
#endif
// Enable the "websocket" module. // Enable the "websocket" module.
#define MICROPY_PY_WEBSOCKET (1) #define MICROPY_PY_WEBSOCKET (1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment