https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=f378384804a6ea14067d5b7468d2222a36a00a29

commit f378384804a6ea14067d5b7468d2222a36a00a29
Author: Corinna Vinschen <[email protected]>
Date:   Thu Aug 3 23:09:57 2017 +0200

    cygwin: pthread_rwlock_rdlock: don't set errno, just return error code
    
    Signed-off-by: Corinna Vinschen <[email protected]>

Diff:
---
 winsup/cygwin/thread.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
index 963c401..9099407 100644
--- a/winsup/cygwin/thread.cc
+++ b/winsup/cygwin/thread.cc
@@ -1426,7 +1426,7 @@ pthread_rwlock::rdlock (PLARGE_INTEGER timeout)
       if (reader->n < UINT32_MAX)
        ++reader->n;
       else
-       errno = EAGAIN;
+       result = EAGAIN;
       goto DONE;
     }

Reply via email to