comparison 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
comparison
equal deleted inserted replaced
6401:6812ca9a8002 6402:7296b38f6416
9 9
10 #if (NGX_HAVE_SCHED_SETAFFINITY || NGX_HAVE_CPUSET_SETAFFINITY) 10 #if (NGX_HAVE_SCHED_SETAFFINITY || NGX_HAVE_CPUSET_SETAFFINITY)
11 11
12 #define NGX_HAVE_CPU_AFFINITY 1 12 #define NGX_HAVE_CPU_AFFINITY 1
13 13
14 void ngx_setaffinity(uint64_t cpu_affinity, ngx_log_t *log); 14 #if (NGX_HAVE_SCHED_SETAFFINITY)
15
16 typedef cpu_set_t ngx_cpuset_t;
17
18 #elif (NGX_HAVE_CPUSET_SETAFFINITY)
19
20 #include <sys/cpuset.h>
21
22 typedef cpuset_t ngx_cpuset_t;
23
24 #endif
25
26 void ngx_setaffinity(ngx_cpuset_t *cpu_affinity, ngx_log_t *log);
15 27
16 #else 28 #else
17 29
18 #define ngx_setaffinity(cpu_affinity, log) 30 #define ngx_setaffinity(cpu_affinity, log)
19 31
32 typedef uint64_t ngx_cpuset_t;
33
20 #endif 34 #endif
21 35
22 36
23 #endif /* _NGX_SETAFFINITY_H_INCLUDED_ */ 37 #endif /* _NGX_SETAFFINITY_H_INCLUDED_ */