Internally track resultant byte counts as ssize_t, but return 0 as int for success indication, per POSIX.
This is the core of the AIO implementation: aio.cc and aio.h. The latter is used within the Cygwin DLL by aio.cc and the fhandler* modules, as well as by user programs wanting the AIO functionality.