annotate src/os/unix/ngx_setaffinity.h @ 4692:489839d07b38

Fixed "sendmsg() failed" alerts on HP-UX. HP-UX needs _HPUX_ALT_XOPEN_SOCKET_API to be defined to be able to use various POSIX versions of networking functions. Notably sendmsg() resulted in "sendmsg() failed (9: Bad file number)" alerts without it. See xopen_networking(7) for more details.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 18 Jun 2012 14:11:29 +0000
parents f31162fefe01
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_ */