public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: fhandler_pipe::raw_read: minor code cleanup
@ 2021-12-13 10:40 Takashi Yano
  0 siblings, 0 replies; only message in thread
From: Takashi Yano @ 2021-12-13 10:40 UTC (permalink / raw)
  To: cygwin-cvs

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;
 }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-13 10:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13 10:40 [newlib-cygwin] Cygwin: fhandler_pipe::raw_read: minor code cleanup Takashi Yano

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).