httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Darroch <>
Subject Re: svn commit: r726113 - /httpd/httpd/trunk/server/mpm/worker/fdqueue.c
Date Fri, 12 Dec 2008 22:57:03 GMT
Ruediger Pluem wrote:

> Not quite sure if this is really correct because apr_atomic_casptr
> wants to have a (volatile void**) as first parameter.

   That's what made me less than sure ... but my gcc 4.1.2 -Wall
definitely doesn't like that void** ("dereferencing type-punned pointer ...").

   I think void* should be OK, because the APR function still
gets a pointer-sized parameter, and casts it to (volatile void**)
locally, which is presumably what really matters: that within the CAS
function the optimizer understands that the pointed-to value (another
pointer, in this case) can be changed by something else it doesn't
know about, and so won't optimize away any accesses.

   But ... I'm no expert on these kinds of compiler guts.  Revert if
it seems wrong and better to spew some warnings.


GPG Key ID: 366A375B
GPG Key Fingerprint: 485E 5041 17E1 E2BB C263  E4DE C8E3 FA36 366A 375B

View raw message