summaryrefslogtreecommitdiffstats
path: root/Affinity.h
diff options
context:
space:
mode:
authorHisham <hisham@gobolinux.org>2016-02-14 19:57:29 -0200
committerHisham <hisham@gobolinux.org>2016-02-14 19:57:29 -0200
commit474d26cea8ad31e77722f81ba801b2c29783e947 (patch)
treeedb8bb8928e96a04dc62ce42a23a92a32c7c2fb5 /Affinity.h
parent35657208d7dc6262c477f5d9d5626dba5d8dc05c (diff)
Portable affinity using hwloc
Diffstat (limited to 'Affinity.h')
-rw-r--r--Affinity.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/Affinity.h b/Affinity.h
index 8f8dde9c..fd2c599e 100644
--- a/Affinity.h
+++ b/Affinity.h
@@ -10,7 +10,12 @@ in the source distribution for its full text.
*/
#ifdef HAVE_LIBHWLOC
-#elif HAVE_NATIVE_AFFINITY
+#if __linux__
+#define HTOP_HWLOC_CPUBIND_FLAG HWLOC_CPUBIND_THREAD
+#else
+#define HTOP_HWLOC_CPUBIND_FLAG HWLOC_CPUBIND_PROCESS
+#endif
+#elif HAVE_LINUX_AFFINITY
#endif
#include "Process.h"
@@ -36,7 +41,7 @@ Affinity* Affinity_get(Process* proc, ProcessList* pl);
bool Affinity_set(Process* proc, Affinity* this);
-#elif HAVE_NATIVE_AFFINITY
+#elif HAVE_LINUX_AFFINITY
Affinity* Affinity_get(Process* proc, ProcessList* pl);

© 2014-2024 Faster IT GmbH | imprint | privacy policy