circuitpython/ports/unix
David Lechner 9418611c8a unix: Implement PEP 475 to retry syscalls failing with EINTR.
https://www.python.org/dev/peps/pep-0475/

This implements something similar to PEP 475 on the unix port, and for the
VfsPosix class.

There are a few differences from the CPython implementation:
- Since we call mp_handle_pending() between any ENITR's, additional
  functions could be called if MICROPY_ENABLE_SCHEDULER is enabled, not
  just signal handlers.
- CPython only handles signal on the main thread, so other threads will
  raise InterruptedError instead of retrying.  On MicroPython,
  mp_handle_pending() will currently raise exceptions on any thread.

A new macro MP_HAL_RETRY_SYSCALL is introduced to reduce duplicated code
and ensure that all instances behave the same.  This will also allow other
ports that use POSIX-like system calls (and use, eg, VfsPosix) to provide
their own implementation if needed.
2020-03-27 14:40:46 +11:00
..
coverage-frzmpy py: Rename MP_QSTR_NULL to MP_QSTRnull to avoid intern collisions. 2019-09-26 16:04:56 +10:00
coverage-frzstr ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
variants unix: Enable uasyncio C helper module on coverage build. 2020-03-26 01:25:45 +11:00
.gitignore unix: Rename unix binaries to micropython-variant (not _variant). 2020-01-12 10:37:40 +11:00
alloc.c all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
coverage.c unix/coverage: Init all pairheap test nodes before using them. 2020-03-26 01:21:04 +11:00
fatfs_port.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
gccollect.c all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
input.c unix: Implement PEP 475 to retry syscalls failing with EINTR. 2020-03-27 14:40:46 +11:00
input.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
main.c unix: Implement PEP 475 to retry syscalls failing with EINTR. 2020-03-27 14:40:46 +11:00
Makefile unix: Remove custom file implementation to use extmod's VFS POSIX one. 2020-03-18 21:01:07 +11:00
manifest_coverage.py unix: Convert to use FROZEN_MANIFEST to specify frozen code. 2019-10-15 21:35:27 +11:00
manifest.py tools/makemanifest.py: Eval relative paths w.r.t. current manifest file. 2019-10-21 23:01:41 +11:00
modffi.c all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
modjni.c all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
modmachine.c all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
modos.c unix: Implement PEP 475 to retry syscalls failing with EINTR. 2020-03-27 14:40:46 +11:00
modtermios.c all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
modtime.c unix: Implement PEP 475 to retry syscalls failing with EINTR. 2020-03-27 14:40:46 +11:00
moduos_vfs.c all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
moduselect.c unix: Implement PEP 475 to retry syscalls failing with EINTR. 2020-03-27 14:40:46 +11:00
modusocket.c unix: Implement PEP 475 to retry syscalls failing with EINTR. 2020-03-27 14:40:46 +11:00
mpconfigport.h unix: Remove custom definition of MP_PLAT_PRINT_STRN. 2020-03-25 00:54:18 +11:00
mpconfigport.mk unix/mpconfigport.mk: Update comment about TLS implementations. 2019-06-05 15:28:30 +10:00
mphalport.h unix: Implement PEP 475 to retry syscalls failing with EINTR. 2020-03-27 14:40:46 +11:00
mpthreadport.c unix/mpthreadport: Fix crash when thread stack size <= 8k. 2020-03-27 13:59:18 +11:00
mpthreadport.h unix/mpthreadport: Add thread deinit code to stop threads on exit. 2019-01-27 12:38:23 +11:00
qstrdefsport.h all: Add *FORMAT-OFF* in various places. 2020-02-28 10:31:07 +11:00
unix_mphal.c unix: Implement PEP 475 to retry syscalls failing with EINTR. 2020-03-27 14:40:46 +11:00