diff options
author | Ruslan Ermilov <ru@nginx.com> | 2012-03-21 13:58:51 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2012-03-21 13:58:51 +0000 |
commit | fbd32d4d19cf7996e1d54b548744639b93f94459 (patch) | |
tree | d8ea2879887aa37e39587d2d377d8b18c88cdd55 /src/os/unix/ngx_setaffinity.h | |
parent | d4b1e5f58b999ad9c36d150ceb4493662f0188dc (diff) | |
download | nginx-fbd32d4d19cf7996e1d54b548744639b93f94459.tar.gz nginx-fbd32d4d19cf7996e1d54b548744639b93f94459.zip |
worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.
Diffstat (limited to 'src/os/unix/ngx_setaffinity.h')
-rw-r--r-- | src/os/unix/ngx_setaffinity.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/os/unix/ngx_setaffinity.h b/src/os/unix/ngx_setaffinity.h new file mode 100644 index 000000000..33f5835de --- /dev/null +++ b/src/os/unix/ngx_setaffinity.h @@ -0,0 +1,23 @@ + +/* + * Copyright (C) Nginx, Inc. + */ + +#ifndef _NGX_SETAFFINITY_H_INCLUDED_ +#define _NGX_SETAFFINITY_H_INCLUDED_ + + +#if (NGX_HAVE_SCHED_SETAFFINITY || NGX_HAVE_CPUSET_SETAFFINITY) + +#define NGX_HAVE_CPU_AFFINITY 1 + +void ngx_setaffinity(uint64_t cpu_affinity, ngx_log_t *log); + +#else + +#define ngx_setaffinity(cpu_affinity, log) + +#endif + + +#endif /* _NGX_SETAFFINITY_H_INCLUDED_ */ |