This is the mail archive of the
cygwin-cvs@cygwin.com
mailing list for the Cygwin project.
[newlib-cygwin] cygwin: pthread_rwlock_rdlock: don't set errno, just return error code
- From: Corinna Vinschen <corinna at sourceware dot org>
- To: cygwin-cvs at sourceware dot org
- Date: 3 Aug 2017 21:15:25 -0000
- Subject: [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;
}