gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r37053 - libmicrohttpd/src/microhttpd


From: gnunet
Subject: [GNUnet-SVN] r37053 - libmicrohttpd/src/microhttpd
Date: Mon, 18 Apr 2016 23:25:56 +0200

Author: Karlson2k
Date: 2016-04-18 23:25:56 +0200 (Mon, 18 Apr 2016)
New Revision: 37053

Modified:
   libmicrohttpd/src/microhttpd/daemon.c
Log:
Added more comments about data races.

Modified: libmicrohttpd/src/microhttpd/daemon.c
===================================================================
--- libmicrohttpd/src/microhttpd/daemon.c       2016-04-18 19:43:58 UTC (rev 
37052)
+++ libmicrohttpd/src/microhttpd/daemon.c       2016-04-18 21:25:56 UTC (rev 
37053)
@@ -1824,6 +1824,14 @@
   if (MHD_NO != daemon->resuming)
     next = daemon->suspended_connections_head;
  
+  /* Clear the flag *only* if connections will be resumed otherwise
+     it may accidentally clear flag that was set at the same time in
+     other thread (just after 'if (MHD_NO != daemon->resuming)' in
+     this thread).
+     Clear flag *before* resuming connections otherwise new connection can
+     be set to "resuming" in other thread, but missed resuming in this
+     function at this time so clearing flag at end will clear it without
+     actually resuming of new connection. */
   if (NULL != next)
     daemon->resuming = MHD_NO;
   while (NULL != (pos = next))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]