Commit [7572e0] Maximize Restore History

Windows: Use overlapped I/O, CreateFile

Overlapped I/O is win32's asynchronous I/O mechanism, which allows
us to start an I/O operation and explicitly wait for it to finish at
a time of our choosing, such that we can simultaneously await other
events instead of blocking unconditionally.

- Support for overlapped I/O is a per-HANDLE flag specified at
file opening time, necessitating a switch to win32's CreateFile
and away from the CRT's _open.

- Wrap win32 file operations in POSIX-compatible functions, so
that UNIX-OPEN, UNIX-READ, UNIX-WRITE, UNIX-CLOSE continue to
work as before. Under the hood, these now call our Lisp or C
functions instead of versions from CRT.

- For now, these functions still return and expect what passes as
file descriptors in CRT.

- INTERRUPT-THREAD is now capable of performing the interruption
in a target thread blocked in socket I/O, indicated using an
errno of "EINTR". Minor changes in FD streams to retry the I/O
operation explicitly in that case.

Does not yet include changes for console I/O, and instead still
falls back to _read and _write in that case. Also not yet included
is interruptible non-overlapped I/O, e.g. for unnamed pipes.

Thanks to Anton Kovalenko.

David Lichteblau David Lichteblau 2012-09-18

changed contrib/sb-bsd-sockets/win32-sockets.lisp
changed src/code/fd-stream.lisp
changed src/code/unix.lisp
changed src/code/win32.lisp
changed src/runtime/Config.x86-win32
changed src/runtime/print.c
changed src/runtime/runtime.h
changed src/runtime/safepoint.c
changed src/runtime/win32-os.c
changed tools-for-build/grovel-headers.c
changed package-data-list.lisp-expr
contrib/sb-bsd-sockets/win32-sockets.lisp Diff Switch to side-by-side view
Loading...
src/code/fd-stream.lisp Diff Switch to side-by-side view
Loading...
src/code/unix.lisp Diff Switch to side-by-side view
Loading...
src/code/win32.lisp Diff Switch to side-by-side view
Loading...
src/runtime/Config.x86-win32 Diff Switch to side-by-side view
Loading...
src/runtime/print.c Diff Switch to side-by-side view
Loading...
src/runtime/runtime.h Diff Switch to side-by-side view
Loading...
src/runtime/safepoint.c Diff Switch to side-by-side view
Loading...
src/runtime/win32-os.c Diff Switch to side-by-side view
Loading...
tools-for-build/grovel-headers.c Diff Switch to side-by-side view
Loading...
package-data-list.lisp-expr Diff Switch to side-by-side view
Loading...