summaryrefslogtreecommitdiffstats
path: root/Source/cmAffinity.cxx
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2018-06-01 13:53:41 (GMT)
committerBrad King <brad.king@kitware.com>2018-06-01 13:53:42 (GMT)
commitd7204e649ed4ebb19bb341b4e49eb51514364922 (patch)
treed9ac3ded5ae6899be7188795011743fe3e6da0a6 /Source/cmAffinity.cxx
parent12fed3edb107c949671043196fa94c542b45452a (diff)
downloadCMake-d7204e649ed4ebb19bb341b4e49eb51514364922.zip
CMake-d7204e649ed4ebb19bb341b4e49eb51514364922.tar.gz
CMake-d7204e649ed4ebb19bb341b4e49eb51514364922.tar.bz2
Revise C++ coding style using clang-format-6.0
Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
Diffstat (limited to 'Source/cmAffinity.cxx')
-rw-r--r--Source/cmAffinity.cxx38
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;