diff options
author | Brad King <brad.king@kitware.com> | 2017-09-06 19:01:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-03-05 14:21:31 (GMT) |
commit | 24de561a1a7529b919215edb0322279449c5e6c0 (patch) | |
tree | 2114c6687833ed4e9b8872eced3cb1a0953ec578 /Utilities/cmlibuv/include | |
parent | 43d6e5a71f7cb68578c72ece1cb5046b929ebdc0 (diff) | |
download | CMake-24de561a1a7529b919215edb0322279449c5e6c0.zip CMake-24de561a1a7529b919215edb0322279449c5e6c0.tar.gz CMake-24de561a1a7529b919215edb0322279449c5e6c0.tar.bz2 |
libuv: unix,win: add uv_spawn option to set child CPU affinity mask
Implement it on Linux, FreeBSD, and Windows for now, and fail with
UV_ENOTSUP on other platforms.
Backported from upstream libuv PR 1527, scheduled for inclusion
in libuv 2.0.
Diffstat (limited to 'Utilities/cmlibuv/include')
-rw-r--r-- | Utilities/cmlibuv/include/uv.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Utilities/cmlibuv/include/uv.h b/Utilities/cmlibuv/include/uv.h index a2ba487..875e30a 100644 --- a/Utilities/cmlibuv/include/uv.h +++ b/Utilities/cmlibuv/include/uv.h @@ -925,6 +925,19 @@ typedef struct uv_process_options_s { */ uv_uid_t uid; uv_gid_t gid; + /* + Libuv can set the child process' CPU affinity mask. This happens when + `cpumask` is non-NULL. It must point to an array of char values + of length `cpumask_size`, whose value must be at least that returned by + uv_cpumask_size(). Each byte in the mask can be either zero (false) + or non-zero (true) to indicate whether the corresponding processor at + that index is included. + + If enabled on an unsupported platform, uv_spawn() will fail with + UV_ENOTSUP. + */ + char* cpumask; + size_t cpumask_size; } uv_process_options_t; /* |