Cygwin: FIFO: improve raw_write
Don't set the write end of the pipe to non-blocking mode if the FIFO is opened in blocking mode. In fhandler_fifo::raw_write in blocking mode, wait for the write to complete rather than returning -1 with EAGAIN. If the amount to write is large, write in smaller chunks (of size determined by a new data member max_atomic_write), as in fhandler_base_overlapped. For convenience, add two new NTSTATUS codes, STATUS_THREAD_SIGNALED and STATUS_THREAD_CANCELED, to ntdll.h.
This commit is contained in:
committed by
Corinna Vinschen
parent
a7d08b3ecd
commit
bb46627871
@ -1273,6 +1273,7 @@ class fhandler_fifo: public fhandler_base
|
||||
int nhandlers, nconnected;
|
||||
af_unix_spinlock_t _fifo_client_lock;
|
||||
bool reader, writer, duplexer;
|
||||
size_t max_atomic_write;
|
||||
bool __reg2 wait (HANDLE);
|
||||
NTSTATUS npfs_handle (HANDLE &);
|
||||
HANDLE create_pipe_instance (bool);
|
||||
|
Reference in New Issue
Block a user