diff options
| author | Vladimir Homutov <vl@nginx.com> | 2016-02-18 13:58:49 +0300 |
|---|---|---|
| committer | Vladimir Homutov <vl@nginx.com> | 2016-02-18 13:58:49 +0300 |
| commit | faa96e82d273bec6cb8bdf37f78e038aecf7621a (patch) | |
| tree | 205d92f8de5efb70b378703307f7a98d3c304e5e /src/os/unix/ngx_setaffinity.h | |
| parent | b5d7d3f024f587682e320d891e52e693939a5f14 (diff) | |
| download | nginx-faa96e82d273bec6cb8bdf37f78e038aecf7621a.tar.gz nginx-faa96e82d273bec6cb8bdf37f78e038aecf7621a.tar.bz2 | |
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Diffstat (limited to 'src/os/unix/ngx_setaffinity.h')
| -rw-r--r-- | src/os/unix/ngx_setaffinity.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/os/unix/ngx_setaffinity.h b/src/os/unix/ngx_setaffinity.h index 33f5835de..a4139edc8 100644 --- a/src/os/unix/ngx_setaffinity.h +++ b/src/os/unix/ngx_setaffinity.h @@ -11,12 +11,26 @@ #define NGX_HAVE_CPU_AFFINITY 1 -void ngx_setaffinity(uint64_t cpu_affinity, ngx_log_t *log); +#if (NGX_HAVE_SCHED_SETAFFINITY) + +typedef cpu_set_t ngx_cpuset_t; + +#elif (NGX_HAVE_CPUSET_SETAFFINITY) + +#include <sys/cpuset.h> + +typedef cpuset_t ngx_cpuset_t; + +#endif + +void ngx_setaffinity(ngx_cpuset_t *cpu_affinity, ngx_log_t *log); #else #define ngx_setaffinity(cpu_affinity, log) +typedef uint64_t ngx_cpuset_t; + #endif |
