[Patch] nginx to use libatomic_ops
wmark+nginx at hurrikane.de
Fri Sep 25 23:46:33 MSD 2009
I have experienced SEGFAULTs on ARM using fastcgi and discovered it
compiles with "NGX_HAVE_ATOMIC_OPS 0" on 'other' architectures than
x86, amd64, sparc and the such defined in src/os/unix/ngx_atomic.h.
Therefore I'd like to contribute the patch linked below , which
introduces configure option "--with-libatomic" and which makes nginx
use atomic operations of that library on these 'other' architectures.
For more information on the library please see . (Indeed, this does
not result in additional runtime dependencies and the atomic ops
compile to less code than those of newer GCC versions .)
--with-libatomic compiles on ARM, does no SEGFAULT, and yields higher
requests per second than with the otherwise used lock file.
The option is disabled by default, and even if enabled still used as
last resort. I hope that after a brief review (I have little
experience with configure scripts) you can integrate it in the next
for gcc 4.1.0 and later
More information about the nginx