1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-07 04:02:58 +03:00

only call mutex functions if APR_HAS_THREADS

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@745338 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Roy T. Fielding
2009-02-18 00:59:39 +00:00
parent 352af5ff8a
commit 7ff9306de2

View File

@@ -290,8 +290,10 @@ void ap_process_async_request(request_rec *r)
ap_time_process_request(r->connection->sbh, START_PREQUEST);
}
#if APR_HAS_THREADS
apr_thread_mutex_create(&r->invoke_mtx, APR_THREAD_MUTEX_DEFAULT, r->pool);
apr_thread_mutex_lock(r->invoke_mtx);
#endif
access_status = ap_run_quick_handler(r, 0); /* Not a look-up request */
if (access_status == DECLINED) {
access_status = ap_process_request_internal(r);
@@ -309,10 +311,14 @@ void ap_process_async_request(request_rec *r)
ap_time_process_request(c->sbh, STOP_PREQUEST);
}
c->cs->state = CONN_STATE_SUSPENDED;
#if APR_HAS_THREADS
apr_thread_mutex_unlock(r->invoke_mtx);
#endif
return;
}
#if APR_HAS_THREADS
apr_thread_mutex_unlock(r->invoke_mtx);
#endif
if (access_status == DONE) {
/* e.g., something not in storage like TRACE */