]> granicus.if.org Git - apache/commitdiff
This allows platforms without the _NP locking palaver to build
authorDavid Reid <dreid@apache.org>
Tue, 25 Dec 2001 02:30:53 +0000 (02:30 +0000)
committerDavid Reid <dreid@apache.org>
Tue, 25 Dec 2001 02:30:53 +0000 (02:30 +0000)
the worker MPM.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92596 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/worker/mpm.h
server/mpm/worker/worker.c

index 5db57028f61b934a6ba8a5af656af12bdc5ccb8f..da992b56fc8980dfe0ee4302ede76e472e310021 100644 (file)
@@ -73,7 +73,9 @@
 #define AP_MPM_WANT_SET_LOCKFILE
 #define AP_MPM_WANT_SET_MAX_REQUESTS
 #define AP_MPM_WANT_SET_COREDUMPDIR
+#if APR_HAS_CREATE_LOCKS_NP
 #define AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
+#endif /* APR_HAS_CREATE_LOCKS_NP */
 #define AP_MPM_DISABLE_NAGLE_ACCEPTED_SOCK
 
 #define MPM_SYNC_CHILD_TABLE() (ap_sync_scoreboard_image())
index 52905285653f8fae2042ed0f2712e2a5799c54f9..d9238ad7d6a0d42e7a8ad26b406ba9092e64056b 100644 (file)
@@ -1391,14 +1391,21 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
     ap_lock_fname = apr_psprintf(_pconf, "%s.%" APR_OS_PROC_T_FMT,
                                  ap_server_root_relative(_pconf, ap_lock_fname),
                                  ap_my_pid);
+
+#if APR_HAS_CREATE_LOCKS_NP
     rv = apr_proc_mutex_create_np(&accept_mutex, ap_lock_fname, 
                                   ap_accept_lock_mech, _pconf);
+#else
+    rv = apr_proc_mutex_create(&accept_mutex, ap_lock_fname, _pconf);
+#endif /* APR_HAS_CREATE_LOCKS_NP */
+
     if (rv != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s,
                      "Couldn't create accept lock");
         return 1;
     }
 
+#if APR_HAS_CREATE_LOCKS_NP
 #if APR_USE_SYSVSEM_SERIALIZE
     if (ap_accept_lock_mech == APR_LOCK_DEFAULT || 
         ap_accept_lock_mech == APR_LOCK_SYSVSEM) {
@@ -1412,6 +1419,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
             return 1;
         }
     }
+#endif /* APR_HAS_CREATE_LOCKS_NP */
 
     if (!is_graceful) {
         ap_run_pre_mpm(pconf, SB_SHARED);