[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r37094 - branches/mhd-0.9.50/src/microhttpd
From: |
gnunet |
Subject: |
[GNUnet-SVN] r37094 - branches/mhd-0.9.50/src/microhttpd |
Date: |
Fri, 29 Apr 2016 23:14:26 +0200 |
Author: Karlson2k
Date: 2016-04-29 23:14:26 +0200 (Fri, 29 Apr 2016)
New Revision: 37094
Modified:
branches/mhd-0.9.50/src/microhttpd/daemon.c
Log:
Added more comments about data races.
Modified: branches/mhd-0.9.50/src/microhttpd/daemon.c
===================================================================
--- branches/mhd-0.9.50/src/microhttpd/daemon.c 2016-04-29 21:14:23 UTC (rev
37093)
+++ branches/mhd-0.9.50/src/microhttpd/daemon.c 2016-04-29 21:14:26 UTC (rev
37094)
@@ -1814,6 +1814,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))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r37094 - branches/mhd-0.9.50/src/microhttpd,
gnunet <=