* fhandler.h (fhandler_socket::read): Declare.

(fhandler_socket::write): Declare.
	* fhandler_procsys.cc (fhandler_procsys::read): Add FIXME comment.
	(fhandler_procsys::write): Ditto.
	* fhandler_socket.cc (fhandler_socket::read): New method.
	(fhandler_socket::write): New method.
	* syscalls.cc: Rearrange order of read/write functions.
	(read): Call fhandler read method directly instead of just readv.
	(readv): Remove EINTR loop.  This is done in all affected fhandler's
	now.
	(write): Call fhandler write method directly instead of just writev.
	Fix debug output.
This commit is contained in:
Corinna Vinschen
2011-05-06 10:56:37 +00:00
parent 92ddb74290
commit a4e5706eb2
5 changed files with 145 additions and 64 deletions

View File

@@ -398,6 +398,7 @@ fhandler_procsys::read (void *ptr, size_t& len)
IO_STATUS_BLOCK io;
LARGE_INTEGER off = { QuadPart:0LL };
/* FIXME: Implement nonblocking I/O, interruptibility and cancelability. */
status = NtReadFile (get_handle (), NULL, NULL, NULL, &io, ptr, len,
&off, NULL);
if (!NT_SUCCESS (status))
@@ -412,6 +413,7 @@ fhandler_procsys::read (void *ptr, size_t& len)
ssize_t __stdcall
fhandler_procsys::write (const void *ptr, size_t len)
{
/* FIXME: Implement nonblocking I/O, interruptibility and cancelability. */
return fhandler_base::raw_write (ptr, len);
}