mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-16 05:54:34 +03:00
Enable affinity support for non-Linux
sched_getaffinity() and sched_setaffinity() are also available on BSDs. Remove the Linux restraint.
This commit is contained in:

committed by
Benny Baumann

parent
adcedf87f5
commit
1fb0c720fe
@ -22,7 +22,7 @@ in the source distribution for its full text.
|
||||
#else
|
||||
#define HTOP_HWLOC_CPUBIND_FLAG HWLOC_CPUBIND_PROCESS
|
||||
#endif
|
||||
#elif defined(HAVE_LINUX_AFFINITY)
|
||||
#elif defined(HAVE_AFFINITY)
|
||||
#include <sched.h>
|
||||
#endif
|
||||
|
||||
@ -84,7 +84,7 @@ bool Affinity_set(Process* proc, Arg arg) {
|
||||
return ok;
|
||||
}
|
||||
|
||||
#elif defined(HAVE_LINUX_AFFINITY)
|
||||
#elif defined(HAVE_AFFINITY)
|
||||
|
||||
Affinity* Affinity_get(const Process* proc, ProcessList* pl) {
|
||||
cpu_set_t cpuset;
|
||||
|
Reference in New Issue
Block a user