From 474d26cea8ad31e77722f81ba801b2c29783e947 Mon Sep 17 00:00:00 2001 From: Hisham Date: Sun, 14 Feb 2016 19:57:29 -0200 Subject: Portable affinity using hwloc --- Affinity.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Affinity.h') 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); -- cgit v1.2.3