annotate src/os/unix/ngx_setaffinity.h @ 4549:f31162fefe01

worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
author Ruslan Ermilov <ru@nginx.com>
date Wed, 21 Mar 2012 13:58:51 +0000
parents
children 7296b38f6416
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4549
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2 /*
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
3 * Copyright (C) Nginx, Inc.
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
4 */
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
5
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
6 #ifndef _NGX_SETAFFINITY_H_INCLUDED_
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
7 #define _NGX_SETAFFINITY_H_INCLUDED_
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
8
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
9
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
10 #if (NGX_HAVE_SCHED_SETAFFINITY || NGX_HAVE_CPUSET_SETAFFINITY)
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
11
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
12 #define NGX_HAVE_CPU_AFFINITY 1
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
13
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
14 void ngx_setaffinity(uint64_t cpu_affinity, ngx_log_t *log);
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
15
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
16 #else
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
17
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
18 #define ngx_setaffinity(cpu_affinity, log)
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
19
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
20 #endif
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
21
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
22
f31162fefe01 worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
23 #endif /* _NGX_SETAFFINITY_H_INCLUDED_ */