diff options
author | Brad King <brad.king@kitware.com> | 2018-06-01 16:52:10 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-06-01 16:52:38 (GMT) |
commit | eed0df951d95d48e7856107175a2baba212c3206 (patch) | |
tree | d9ac3ded5ae6899be7188795011743fe3e6da0a6 /Source/cmAffinity.cxx | |
parent | b671e4799f0e418448681a21120e8e87a97de5dc (diff) | |
parent | d7204e649ed4ebb19bb341b4e49eb51514364922 (diff) | |
download | CMake-eed0df951d95d48e7856107175a2baba212c3206.zip CMake-eed0df951d95d48e7856107175a2baba212c3206.tar.gz CMake-eed0df951d95d48e7856107175a2baba212c3206.tar.bz2 |
Merge topic 'clang-format-6.0'
d7204e649e Revise C++ coding style using clang-format-6.0
12fed3edb1 Empty commit at end of history preceding clang-format-6.0 style transition
523c443d13 clang-format.bash: update to clang-format-6.0
eb7ec19c1c clang-format: Add comments to suppress some formatting
b67a5bf175 Tests/VSWinStorePhone: Do not format managed source
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sebastian Holtermann <sebholt@xwmw.org>
Merge-request: !2123
Diffstat (limited to 'Source/cmAffinity.cxx')
-rw-r--r-- | Source/cmAffinity.cxx | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/Source/cmAffinity.cxx b/Source/cmAffinity.cxx index bdf1f42..588b2f2 100644 --- a/Source/cmAffinity.cxx +++ b/Source/cmAffinity.cxx @@ -5,24 +5,24 @@ #include "cm_uv.h" #ifndef CMAKE_USE_SYSTEM_LIBUV -#ifdef _WIN32 -#define CM_HAVE_CPU_AFFINITY -#include <windows.h> -#elif defined(__linux__) || defined(__FreeBSD__) -#define CM_HAVE_CPU_AFFINITY -#include <pthread.h> -#include <sched.h> -#if defined(__FreeBSD__) -#include <pthread_np.h> -#include <sys/cpuset.h> -#include <sys/param.h> -#endif -#if defined(__linux__) +# ifdef _WIN32 +# define CM_HAVE_CPU_AFFINITY +# include <windows.h> +# elif defined(__linux__) || defined(__FreeBSD__) +# define CM_HAVE_CPU_AFFINITY +# include <pthread.h> +# include <sched.h> +# if defined(__FreeBSD__) +# include <pthread_np.h> +# include <sys/cpuset.h> +# include <sys/param.h> +# endif +# if defined(__linux__) typedef cpu_set_t cm_cpuset_t; -#else +# else typedef cpuset_t cm_cpuset_t; -#endif -#endif +# endif +# endif #endif namespace cmAffinity { @@ -33,7 +33,7 @@ std::set<size_t> GetProcessorsAvailable() #ifdef CM_HAVE_CPU_AFFINITY int cpumask_size = uv_cpumask_size(); if (cpumask_size > 0) { -#ifdef _WIN32 +# ifdef _WIN32 DWORD_PTR procmask; DWORD_PTR sysmask; if (GetProcessAffinityMask(GetCurrentProcess(), &procmask, &sysmask) != @@ -44,7 +44,7 @@ std::set<size_t> GetProcessorsAvailable() } } } -#else +# else cm_cpuset_t cpuset; CPU_ZERO(&cpuset); // NOLINT(clang-tidy) if (pthread_getaffinity_np(pthread_self(), sizeof(cpuset), &cpuset) == 0) { @@ -54,7 +54,7 @@ std::set<size_t> GetProcessorsAvailable() } } } -#endif +# endif } #endif return processorsAvailable; |