static apr_thread_mutex_t *accept_mutex = NULL;
/* Keep track of the number of worker threads currently active */
-static int worker_thread_count;
-static apr_thread_mutex_t *worker_thread_count_mutex;
+static unsigned long worker_thread_count;
static int request_count;
/* Structure used to register/deregister a console handler with the OS */
apr_bucket_alloc_destroy(bucket_alloc);
apr_pool_destroy(ptrans);
- apr_thread_mutex_lock(worker_thread_count_mutex);
- worker_thread_count--;
- apr_thread_mutex_unlock(worker_thread_count_mutex);
+ atomic_dec (&worker_thread_count);
if (worker_num >=0)
ap_update_child_status_from_indexes(0, worker_num, WORKER_DEAD,
(request_rec *) NULL);
bucket_alloc = apr_bucket_alloc_create(pmain);
- apr_thread_mutex_lock(worker_thread_count_mutex);
- worker_thread_count++;
- apr_thread_mutex_unlock(worker_thread_count_mutex);
+ atomic_inc (&worker_thread_count);
ap_update_child_status_from_indexes(0, my_worker_num, WORKER_READY,
(request_rec *) NULL);
restart_pending = shutdown_pending = 0;
worker_thread_count = 0;
- apr_thread_mutex_create(&worker_thread_count_mutex, APR_THREAD_MUTEX_DEFAULT, pconf);
apr_thread_mutex_create(&accept_mutex, APR_THREAD_MUTEX_DEFAULT, pconf);
if (!is_graceful) {