]> sourceware.org Git - newlib-cygwin.git/commitdiff
Cygwin: fhandler_pipe::raw_read: minor code cleanup
authorKen Brown <kbrown@cornell.edu>
Thu, 11 Nov 2021 15:22:41 +0000 (10:22 -0500)
committerTakashi Yano <takashi.yano@nifty.ne.jp>
Sun, 12 Dec 2021 13:11:06 +0000 (22:11 +0900)
Remove references to STATUS_THREAD_SIGNALED and
STATUS_THREAD_CANCELED, which can't occur any more.

winsup/cygwin/fhandler_pipe.cc

index 40fb2349a9bb178e6d467c4ed1a1550dc749015d..ba6b70f55244bb8d041d74163b50e9570985e1b7 100644 (file)
@@ -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;
 }
 
This page took 0.034635 seconds and 5 git commands to generate.