You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2018/01/02 15:24:48 UTC
svn commit: r1819847 - /httpd/httpd/trunk/server/mpm/event/event.c
Author: ylavic
Date: Tue Jan 2 15:24:48 2018
New Revision: 1819847
URL: http://svn.apache.org/viewvc?rev=1819847&view=rev
Log:
mpm_event: avoid unexpected compiler optimizations.
Make sure the compiler doesn't play games with our synchronization variables
by marking them volatile.
Modified:
httpd/httpd/trunk/server/mpm/event/event.c
Modified: httpd/httpd/trunk/server/mpm/event/event.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/event.c?rev=1819847&r1=1819846&r2=1819847&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/event/event.c (original)
+++ httpd/httpd/trunk/server/mpm/event/event.c Tue Jan 2 15:24:48 2018
@@ -180,10 +180,10 @@ static int max_workers = 0;
static int server_limit = 0; /* ServerLimit */
static int thread_limit = 0; /* ThreadLimit */
static int had_healthy_child = 0;
-static int dying = 0;
-static int workers_may_exit = 0;
-static int start_thread_may_exit = 0;
-static int listener_may_exit = 0;
+static volatile int dying = 0;
+static volatile int workers_may_exit = 0;
+static volatile int start_thread_may_exit = 0;
+static volatile int listener_may_exit = 0;
static int listener_is_wakeable = 0; /* Pollset supports APR_POLLSET_WAKEABLE */
static int num_listensocks = 0;
static apr_int32_t conns_this_child; /* MaxConnectionsPerChild, only access