httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1640145 - in /httpd/httpd/trunk/server/mpm: prefork/prefork.c worker/worker.c
Date Mon, 17 Nov 2014 11:45:30 GMT
Author: ylavic
Date: Mon Nov 17 11:45:29 2014
New Revision: 1640145

URL: http://svn.apache.org/r1640145
Log:
mpm_worker, mpm_prefork: follow up to r1635521.
Use one dedicated accept mutex per listeners bucket.

Modified:
    httpd/httpd/trunk/server/mpm/prefork/prefork.c
    httpd/httpd/trunk/server/mpm/worker/worker.c

Modified: httpd/httpd/trunk/server/mpm/prefork/prefork.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/prefork/prefork.c?rev=1640145&r1=1640144&r2=1640145&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/prefork/prefork.c (original)
+++ httpd/httpd/trunk/server/mpm/prefork/prefork.c Mon Nov 17 11:45:29 2014
@@ -1281,6 +1281,7 @@ static int prefork_open_logs(apr_pool_t 
     int level_flags = 0;
     ap_listen_rec **listen_buckets;
     apr_status_t rv;
+    char id[16];
     int i;
 
     pconf = p;
@@ -1322,10 +1323,11 @@ static int prefork_open_logs(apr_pool_t 
                          "could not open pipe-of-death");
             return DONE;
         }
-        /* Initialize cross-process accept lock when safe accept is needed */
-        if ((rv = SAFE_ACCEPT(ap_proc_mutex_create(&all_buckets[i].mutex, NULL,
-                                                   AP_ACCEPT_MUTEX_TYPE, NULL,
-                                                   s, pconf, 0)))) {
+        /* Initialize cross-process accept lock (safe accept is needed only) */
+        if ((rv = SAFE_ACCEPT((apr_snprintf(id, sizeof id, "%i", i),
+                               ap_proc_mutex_create(&all_buckets[i].mutex,
+                                                    NULL, AP_ACCEPT_MUTEX_TYPE,
+                                                    id, s, pconf, 0))))) {
             ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
                          (startup ? NULL : s),
                          "could not create accept mutex");

Modified: httpd/httpd/trunk/server/mpm/worker/worker.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/worker/worker.c?rev=1640145&r1=1640144&r2=1640145&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/worker/worker.c (original)
+++ httpd/httpd/trunk/server/mpm/worker/worker.c Mon Nov 17 11:45:29 2014
@@ -2002,6 +2002,7 @@ static int worker_open_logs(apr_pool_t *
     int level_flags = 0;
     ap_listen_rec **listen_buckets;
     apr_status_t rv;
+    char id[16];
     int i;
 
     pconf = p;
@@ -2043,10 +2044,11 @@ static int worker_open_logs(apr_pool_t *
                          "could not open pipe-of-death");
             return DONE;
         }
-        /* Initialize cross-process accept lock when safe accept is needed */
-        if ((rv = SAFE_ACCEPT(ap_proc_mutex_create(&all_buckets[i].mutex, NULL,
-                                                   AP_ACCEPT_MUTEX_TYPE, NULL,
-                                                   s, pconf, 0)))) {
+        /* Initialize cross-process accept lock (safe accept is needed only) */
+        if ((rv = SAFE_ACCEPT((apr_snprintf(id, sizeof id, "%i", i),
+                               ap_proc_mutex_create(&all_buckets[i].mutex,
+                                                    NULL, AP_ACCEPT_MUTEX_TYPE,
+                                                    id, s, pconf, 0))))) {
             ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
                          (startup ? NULL : s),
                          "could not create accept mutex");



Mime
View raw message