diff options
author | Igor Sysoev <igor@sysoev.ru> | 2011-05-10 11:39:13 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2011-05-10 11:39:13 +0000 |
commit | e2c8ad71221ebcf5ca6331811118f9a6d18aec45 (patch) | |
tree | 538d98e7b04df5ba091650e21cf3f04a9c4fa284 /src/os/unix | |
parent | 9505277aa657590588504ae8f85e712f87d92ce6 (diff) | |
download | nginx-e2c8ad71221ebcf5ca6331811118f9a6d18aec45.tar.gz nginx-e2c8ad71221ebcf5ca6331811118f9a6d18aec45.zip |
use POSIX semaphores in shmtx instead of sched_yield()
number of spinlock spins are increased twice
Diffstat (limited to 'src/os/unix')
-rw-r--r-- | src/os/unix/ngx_darwin_config.h | 5 | ||||
-rw-r--r-- | src/os/unix/ngx_freebsd_config.h | 5 | ||||
-rw-r--r-- | src/os/unix/ngx_linux_config.h | 5 | ||||
-rw-r--r-- | src/os/unix/ngx_posix_config.h | 5 | ||||
-rw-r--r-- | src/os/unix/ngx_solaris_config.h | 5 |
5 files changed, 25 insertions, 0 deletions
diff --git a/src/os/unix/ngx_darwin_config.h b/src/os/unix/ngx_darwin_config.h index 39009768f..88aa6f502 100644 --- a/src/os/unix/ngx_darwin_config.h +++ b/src/os/unix/ngx_darwin_config.h @@ -56,6 +56,11 @@ #include <ngx_auto_config.h> +#if (NGX_HAVE_POSIX_SEM) +#include <semaphore.h> +#endif + + #if (NGX_HAVE_POLL) #include <poll.h> #endif diff --git a/src/os/unix/ngx_freebsd_config.h b/src/os/unix/ngx_freebsd_config.h index 20cb66640..ec7a375a8 100644 --- a/src/os/unix/ngx_freebsd_config.h +++ b/src/os/unix/ngx_freebsd_config.h @@ -68,6 +68,11 @@ #include <ngx_auto_config.h> +#if (NGX_HAVE_POSIX_SEM) +#include <semaphore.h> +#endif + + #if (NGX_HAVE_POLL) #include <poll.h> #endif diff --git a/src/os/unix/ngx_linux_config.h b/src/os/unix/ngx_linux_config.h index cf45e54a1..046095d1d 100644 --- a/src/os/unix/ngx_linux_config.h +++ b/src/os/unix/ngx_linux_config.h @@ -58,6 +58,11 @@ #include <ngx_auto_config.h> +#if (NGX_HAVE_POSIX_SEM) +#include <semaphore.h> +#endif + + #if (NGX_HAVE_SYS_PRCTL_H) #include <sys/prctl.h> #endif diff --git a/src/os/unix/ngx_posix_config.h b/src/os/unix/ngx_posix_config.h index 86a80d701..aec8a0a35 100644 --- a/src/os/unix/ngx_posix_config.h +++ b/src/os/unix/ngx_posix_config.h @@ -96,6 +96,11 @@ #include <ngx_auto_config.h> +#if (NGX_HAVE_POSIX_SEM) +#include <semaphore.h> +#endif + + #if (NGX_HAVE_POLL) #include <poll.h> #endif diff --git a/src/os/unix/ngx_solaris_config.h b/src/os/unix/ngx_solaris_config.h index ae8212d8a..6b3d42eaa 100644 --- a/src/os/unix/ngx_solaris_config.h +++ b/src/os/unix/ngx_solaris_config.h @@ -57,6 +57,11 @@ #include <ngx_auto_config.h> +#if (NGX_HAVE_POSIX_SEM) +#include <semaphore.h> +#endif + + #if (NGX_HAVE_POLL) #include <poll.h> #endif |