diff options
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r-- | winsup/cygwin/fhandler.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 1a18b7550..ab588b500 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -234,6 +234,11 @@ fhandler_base::raw_read (void *ptr, size_t& ulen) signal_read_state (1); } BOOL res = ReadFile (get_handle (), ptr, len, (DWORD *) &ulen, 0); + if (read_state) + { + signal_read_state (1); + (void) SetThreadPriority (h, prio); + } if (!res) { /* Some errors are not really errors. Detect such cases here. */ @@ -270,11 +275,6 @@ fhandler_base::raw_read (void *ptr, size_t& ulen) break; } } - if (read_state) - { - signal_read_state (1); - (void) SetThreadPriority (h, prio); - } #undef bytes_read } |