circuitpython/ports/unix
Damien George cf31d384f1 py/stream: Switch stream close operation from method to ioctl.
This patch moves the implementation of stream closure from a dedicated
method to the ioctl of the stream protocol, for each type that implements
closing.  The benefits of this are:

1. Rounds out the stream ioctl function, which already includes flush,
   seek and poll (among other things).

2. Makes calling mp_stream_close() on an object slightly more efficient
   because it now no longer needs to lookup the close method and call it,
   rather it just delegates straight to the ioctl function (if it exists).

3. Reduces code size and allows future types that implement the stream
   protocol to be smaller because they don't need a dedicated close method.

Code size reduction is around 200 bytes smaller for x86 archs and around
30 bytes smaller for the bare-metal archs.
2018-04-10 13:41:32 +10:00
..
coverage-frzmpy ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
coverage-frzstr ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
modules all: Update Makefiles and others to build with new ports/ dir layout. 2017-09-06 14:09:13 +10:00
.gitignore ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
Makefile unix/Makefile,embedding/Makefile: Remove obsolete use of STMHAL_SRC_C. 2018-02-14 15:24:21 +11:00
alloc.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
coverage.c unix/coverage: Allow coverage tests to pass with debugging disabled. 2018-03-08 12:49:31 +11:00
fatfs_port.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
fdfile.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
file.c py/stream: Switch stream close operation from method to ioctl. 2018-04-10 13:41:32 +10:00
gccollect.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
input.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10: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: Add support for using the Python stack. 2017-12-11 13:49:09 +11:00
modffi.c py/objstr: Remove "make_qstr_if_not_already" arg from mp_obj_new_str. 2017-11-16 13:17:51 +11:00
modjni.c py/objstr: Remove "make_qstr_if_not_already" arg from mp_obj_new_str. 2017-11-16 13:17:51 +11:00
modmachine.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
modos.c py/objstr: Remove "make_qstr_if_not_already" arg from mp_obj_new_str. 2017-11-16 13:17:51 +11:00
modtermios.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
modtime.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
moduos_vfs.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
moduselect.c unix/moduselect: Fix nanbox build after adding .dump() method. 2017-11-07 01:13:19 +02:00
modusocket.c py/stream: Switch stream close operation from method to ioctl. 2018-04-10 13:41:32 +10:00
mpconfigport.h ports: Enable ucollections.deque on relevant ports. 2018-02-21 22:55:13 +11:00
mpconfigport.mk ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
mpconfigport_coverage.h unix/mpconfigport_coverage: Enable range (in)equality comparison. 2018-02-14 23:22:02 +11:00
mpconfigport_fast.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
mpconfigport_freedos.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
mpconfigport_minimal.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
mpconfigport_nanbox.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
mphalport.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
mpthreadport.c unix: Add support for using the Python stack. 2017-12-11 13:49:09 +11:00
mpthreadport.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
qstrdefsport.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
unix_mphal.c extmod/uos_dupterm: Update uos.dupterm() and helper funcs to have index. 2017-10-13 20:01:57 +11:00