Mercurial > hg > nginx
diff src/os/unix/ngx_setaffinity.h @ 6402:7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Thu, 18 Feb 2016 13:58:49 +0300 |
parents | f31162fefe01 |
children |
line wrap: on
line diff
--- 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