| Age | Commit message (Collapse) | Author |
|
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
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.
|
|
|
|
The implementation in extmod/vfs_posix_file.c is now equivalent to that in
ports/unix/file.c, so remove the latter and use the former instead.
|
|
Also support MP_STREAM_GET_FILENO ioctl. The stdio flush change was done
previously for the unix port in 3e0b46b9af8b7a6934b7ac68671ef8f55be2b848.
These changes make this POSIX file implementation equivalent to the unix
file implementation.
|
|
|
|
This is run with uncrustify 0.70.1, and black 19.10b0.
|
|
This releases the GIL during syscalls that could block.
|
|
This helps to prevent mistakes, and allows easily changing the ROM value of
None if needed.
|
|
This helper function was added a while ago and these are the remaining
cases to convert, to save a bit of code size.
|
|
Fixes issue #5018.
|
|
|
|
This VFS component allows to mount a host POSIX filesystem within the uPy
VFS sub-system. All traditional POSIX file access then goes through the
VFS, allowing to sandbox a uPy process to a certain sub-dir of the host
system, as well as mount other filesystem types alongside the host
filesystem.
|