summaryrefslogtreecommitdiff
path: root/unix/moduselect.c
AgeCommit message (Collapse)Author
2016-01-11py: Change type signature of builtin funs that take variable or kw args.Damien George
With this patch the n_args parameter is changed type from mp_uint_t to size_t.
2016-01-03py: Change struct and macro for builtin fun so they can be type checked.Damien George
2015-12-13unix/moduselect: Make configurable with MICROPY_PY_USELECT.Paul Sokolovsky
2015-12-11unix/moduselect: Implement "one-shot" flag for poll.poll().Paul Sokolovsky
After an I/O event is triggered for fd, event flags are automatically reset, so no further events are reported until new event flags are set. This is an optimization for uasyncio, required to account for coroutine semantics: each coroutine issues explicit read/write async call, and once that trigger, no events should be reported to coroutine, unless it again explicitly requests it. One-shot mode saves one linear scan over the poll array.
2015-12-05unix/moduselect: register(): Allow to call with duplicate file descriptor.Paul Sokolovsky
Per CPython docs, "Registering a file descriptor that’s already registered is not an error, and has the same effect as registering the descriptor exactly once." https://docs.python.org/3/library/select.html#select.poll.register That's somewhat ambiguous, what's implemented here is that if fd si not yet registered, it is registered. Otherwise, the effect is equivalent to modify() method.
2015-11-30unix/moduselect: Support growing of poll array.Paul Sokolovsky
2015-11-29py: Wrap all obj-ptr conversions in MP_OBJ_TO_PTR/MP_OBJ_FROM_PTR.Damien George
This allows the mp_obj_t type to be configured to something other than a pointer-sized primitive type. This patch also includes additional changes to allow the code to compile when sizeof(mp_uint_t) != sizeof(void*), such as using size_t instead of mp_uint_t, and various casts.
2015-11-29py: Add MP_ROM_* macros and mp_rom_* types and use them.Damien George
2015-11-29unix/moduselect: poll.register(): Reuse freed entries in poll array.Paul Sokolovsky
2015-11-28unix/moduselect: Fix bug in poll.poll() scanning loop.Paul Sokolovsky
2015-11-20unix/moduselect: Initialise variable so can compile in non-debug mode.Damien George
2015-11-17unix: Add "uselect" module, with poll() function.Paul Sokolovsky
Underlyingly, uses standard POSIX poll() for portability.