This replaces half-closing sockets with calls to shut down a socket endpoint for read, write, or both as a separate operation from closing. Shutting an endpoint down for read disables all further reads from that endpoint (past data already buffered) and all further writes into the peer endpoint. Shutting an endpoint down for writing disables all further writing into that endpoint and all reader from the peer endpoint (past data already buffered). Shutting a socket endpoint down no longer raises the PEER_CLOSED signal on the peer endpoint. Separate signals are raised when reading and writing are disabled and the PEER_CLOSED signal is only raised when the peer is actually closed. In mxio, this fully implements the posix shutdown(2) calls for local sockets created with the socketpair(2) call. Remote sockets support shutdown(SHUT_WR) using their existing mechanism. Once remote sockets are migrated to use an mx_socket directly, they can re-use this machinery to fully support partial shutdowns. This is a reland of2f2e0a0f8fwhich was reverted ina8fa45f268, with the following changes: mxio/remotesocket.c updated to use the new shutdown bits for reading and writing The READ_DISABLED signal is now only raised when reading is disabled in that direction on the socket and the socket is drained in that direction. New tests added for blocking recv() and send() and fixes in the mxio bindings to behave correctly for these cases. Change-Id: I455855d29a6a79d2e98ad47b37222965332b9b98
Magenta
Magenta is the core platform that powers the Fuchsia OS. Magenta is composed of a microkernel (source in kernel/...) as well as a small set of userspace services, drivers, and libraries (source in system/...) necessary for the system to boot, talk to hardware, load userspace processes and run them, etc. Fuchsia builds a much larger OS on top of this foundation.
The canonical Magenta Git repository is located at: https://fuchsia.googlesource.com/magenta
A read-only mirror of the code is present at: https://github.com/fuchsia-mirror/magenta
The Magenta Kernel provides syscalls to manage processes, threads, virtual memory, inter-process communication, waiting on object state changes, and locking (via futexes).
Currently there are some temporary syscalls that have been used for early bringup work, which will be going away in the future as the long term syscall API/ABI surface is finalized. The expectation is that there will be 10s, not 100s of syscalls.
Magenta syscalls are generally non-blocking. The wait (one, many, set) family of syscalls, ioport reads, and thread sleep being the notable exceptions.
This page is a non-comprehensive index of the magenta documentation.