[newlib-cygwin] Cygwin: af_unix_spinlock_t: add initializer

Corinna Vinschen corinna@sourceware.org
Fri Jan 11 09:18:00 GMT 2019


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

commit 367df1d4e02dc1c6d636387d439533d4427d9b5b
Author: Ken Brown <kbrown@cornell.edu>
Date:   Thu Jan 10 17:56:55 2019 +0000

    Cygwin: af_unix_spinlock_t: add initializer
    
    Also fix a typo.

Diff:
---
 winsup/cygwin/fhandler.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index d02b9a9..7e46070 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -832,9 +832,10 @@ class fhandler_socket_local: public fhandler_socket_wsock
 /* Sharable spinlock with low CPU profile.  These locks are NOT recursive! */
 class af_unix_spinlock_t
 {
-  LONG  locked;          /* 0 oder 1 */
+  LONG  locked;          /* 0 or 1 */
 
 public:
+  af_unix_spinlock_t () : locked (0) {}
   void lock ()
   {
     LONG ret = InterlockedExchange (&locked, 1);



More information about the Cygwin-cvs mailing list