httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r563147 - /httpd/httpd/trunk/server/mpm/experimental/event/fdqueue.c
Date Mon, 06 Aug 2007 14:20:24 GMT
Author: jim
Date: Mon Aug  6 07:20:24 2007
New Revision: 563147

URL: http://svn.apache.org/viewvc?view=rev&rev=563147
Log:
These atomics expect apr_uint32_t *... The expectation, of course,
is that the add/inc still works "as expected" even though we
are using signed values.

Modified:
    httpd/httpd/trunk/server/mpm/experimental/event/fdqueue.c

Modified: httpd/httpd/trunk/server/mpm/experimental/event/fdqueue.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/experimental/event/fdqueue.c?view=diff&rev=563147&r1=563146&r2=563147
==============================================================================
--- httpd/httpd/trunk/server/mpm/experimental/event/fdqueue.c (original)
+++ httpd/httpd/trunk/server/mpm/experimental/event/fdqueue.c Mon Aug  6 07:20:24 2007
@@ -95,7 +95,7 @@
     ap_push_pool(queue_info, pool_to_recycle);
 
     /* Atomically increment the count of idle workers */
-    prev_idlers = apr_atomic_inc32(&(queue_info->idlers));
+    prev_idlers = apr_atomic_inc32((apr_uint32_t *)&(queue_info->idlers));
 
     /* If other threads are waiting on a worker, wake one up */
     if (prev_idlers < 0) {
@@ -124,14 +124,14 @@
     int prev_idlers;
 
     /* Atomically decrement the idle worker count, saving the old value */
-    prev_idlers = apr_atomic_add32(&(queue_info->idlers), -1);
+    prev_idlers = apr_atomic_add32((apr_uint32_t *)&(queue_info->idlers), -1);
 
     /* Block if there weren't any idle workers */
     if (prev_idlers <= 0) {
         rv = apr_thread_mutex_lock(queue_info->idlers_mutex);
         if (rv != APR_SUCCESS) {
             AP_DEBUG_ASSERT(0);
-            apr_atomic_inc32(&(queue_info->idlers));    /* back out dec */
+            apr_atomic_inc32((apr_uint32_t *)&(queue_info->idlers));    /* back out
dec */
             return rv;
         }
         /* Re-check the idle worker count to guard against a



Mime
View raw message