Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 86760 invoked by uid 500); 25 Dec 2001 02:30:55 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 86749 invoked by uid 500); 25 Dec 2001 02:30:55 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 25 Dec 2001 02:30:54 -0000 Message-ID: <20011225023054.56783.qmail@icarus.apache.org> From: dreid@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/server/mpm/worker worker.c mpm.h X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N dreid 01/12/24 18:30:54 Modified: server/mpm/worker worker.c mpm.h Log: This allows platforms without the _NP locking palaver to build the worker MPM. Revision Changes Path 1.52 +8 -0 httpd-2.0/server/mpm/worker/worker.c Index: worker.c =================================================================== RCS file: /home/cvs/httpd-2.0/server/mpm/worker/worker.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- worker.c 2001/12/23 13:56:49 1.51 +++ worker.c 2001/12/25 02:30:53 1.52 @@ -1391,14 +1391,21 @@ 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 @@ return 1; } } +#endif /* APR_HAS_CREATE_LOCKS_NP */ if (!is_graceful) { ap_run_pre_mpm(pconf, SB_SHARED); 1.7 +2 -0 httpd-2.0/server/mpm/worker/mpm.h Index: mpm.h =================================================================== RCS file: /home/cvs/httpd-2.0/server/mpm/worker/mpm.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- mpm.h 2001/11/14 23:13:27 1.6 +++ mpm.h 2001/12/25 02:30:53 1.7 @@ -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())