This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] cygwin: pthread_rwlock_rdlock: don't set errno, just return error code


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

commit f378384804a6ea14067d5b7468d2222a36a00a29
Author: Corinna Vinschen <corinna@vinschen.de>
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 <corinna@vinschen.de>

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]