From: Brian Pane Date: Mon, 29 Apr 2002 01:57:39 +0000 (+0000) Subject: Removed some code from the mutex-protected block in ap_queue_pop(). X-Git-Tag: 2.0.36~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69371c8cb3660d63883f1f43e987dd5caf2f7e2b;p=thirdparty%2Fapache%2Fhttpd.git Removed some code from the mutex-protected block in ap_queue_pop(). If the worker thread synchronization is working properly, it's not necessary to set these fields to NULL after removing an element from the queue, and it's IMO more important to have a shorter code path leading up to the mutex_unlock. I left in support for NULLing the fields when debugging, though. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94850 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/worker/fdqueue.c b/server/mpm/worker/fdqueue.c index 14c17e7ecf0..b582929e153 100644 --- a/server/mpm/worker/fdqueue.c +++ b/server/mpm/worker/fdqueue.c @@ -317,8 +317,10 @@ apr_status_t ap_queue_pop(fd_queue_t *queue, apr_socket_t **sd, apr_pool_t **p) elem = &queue->data[--queue->nelts]; *sd = elem->sd; *p = elem->p; +#ifdef AP_DEBUG elem->sd = NULL; elem->p = NULL; +#endif /* AP_DEBUG */ rv = apr_thread_mutex_unlock(queue->one_big_mutex); return rv;