Cygwin: fhandler_pipe::raw_read: minor code cleanup
Remove references to STATUS_THREAD_SIGNALED and STATUS_THREAD_CANCELED, which can't occur any more.
This commit is contained in:
parent
9e4d308cd5
commit
d9c1aeaddf
|
@ -332,10 +332,7 @@ fhandler_pipe::raw_read (void *ptr, size_t& len)
|
||||||
set_errno (EBADF);
|
set_errno (EBADF);
|
||||||
nbytes = (size_t) -1;
|
nbytes = (size_t) -1;
|
||||||
}
|
}
|
||||||
else if (NT_SUCCESS (status)
|
else if (NT_SUCCESS (status) || status == STATUS_BUFFER_OVERFLOW)
|
||||||
|| status == STATUS_BUFFER_OVERFLOW
|
|
||||||
|| status == STATUS_THREAD_CANCELED
|
|
||||||
|| status == STATUS_THREAD_SIGNALED)
|
|
||||||
{
|
{
|
||||||
nbytes_now = io.Information;
|
nbytes_now = io.Information;
|
||||||
ptr = ((char *) ptr) + nbytes_now;
|
ptr = ((char *) ptr) + nbytes_now;
|
||||||
|
@ -384,13 +381,6 @@ fhandler_pipe::raw_read (void *ptr, size_t& len)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ReleaseMutex (read_mtx);
|
ReleaseMutex (read_mtx);
|
||||||
if (status == STATUS_THREAD_SIGNALED && nbytes == 0)
|
|
||||||
{
|
|
||||||
set_errno (EINTR);
|
|
||||||
nbytes = (size_t) -1;
|
|
||||||
}
|
|
||||||
else if (status == STATUS_THREAD_CANCELED)
|
|
||||||
pthread::static_cancel_self ();
|
|
||||||
len = nbytes;
|
len = nbytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue