public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Takashi Yano <tyan0@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: fhandler_pipe::raw_read: minor code cleanup Date: Mon, 13 Dec 2021 10:40:06 +0000 (GMT) [thread overview] Message-ID: <20211213104006.8FB783858012@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=d9c1aeaddf51a25ba357685dca7b1247b577b07e commit d9c1aeaddf51a25ba357685dca7b1247b577b07e Author: Ken Brown <kbrown@cornell.edu> Date: Thu Nov 11 10:22:41 2021 -0500 Cygwin: fhandler_pipe::raw_read: minor code cleanup Remove references to STATUS_THREAD_SIGNALED and STATUS_THREAD_CANCELED, which can't occur any more. Diff: --- winsup/cygwin/fhandler_pipe.cc | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/winsup/cygwin/fhandler_pipe.cc b/winsup/cygwin/fhandler_pipe.cc index 40fb2349a..ba6b70f55 100644 --- a/winsup/cygwin/fhandler_pipe.cc +++ b/winsup/cygwin/fhandler_pipe.cc @@ -332,10 +332,7 @@ fhandler_pipe::raw_read (void *ptr, size_t& len) set_errno (EBADF); nbytes = (size_t) -1; } - else if (NT_SUCCESS (status) - || status == STATUS_BUFFER_OVERFLOW - || status == STATUS_THREAD_CANCELED - || status == STATUS_THREAD_SIGNALED) + else if (NT_SUCCESS (status) || status == STATUS_BUFFER_OVERFLOW) { nbytes_now = io.Information; ptr = ((char *) ptr) + nbytes_now; @@ -384,13 +381,6 @@ fhandler_pipe::raw_read (void *ptr, size_t& len) break; } 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; }
reply other threads:[~2021-12-13 10:40 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211213104006.8FB783858012@sourceware.org \ --to=tyan0@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).