2012-12-05 15:12:20 +00:00
|
|
|
/* Do not edit this file. It was automatically generated. */
|
|
|
|
|
|
|
|
#ifndef HEADER_Affinity
|
|
|
|
#define HEADER_Affinity
|
|
|
|
/*
|
|
|
|
htop - Affinity.h
|
|
|
|
(C) 2004-2011 Hisham H. Muhammad
|
|
|
|
Released under the GNU GPL, see the COPYING file
|
|
|
|
in the source distribution for its full text.
|
|
|
|
*/
|
|
|
|
|
2015-01-22 01:27:31 +00:00
|
|
|
#ifdef HAVE_LIBHWLOC
|
2016-02-14 21:57:29 +00:00
|
|
|
#if __linux__
|
|
|
|
#define HTOP_HWLOC_CPUBIND_FLAG HWLOC_CPUBIND_THREAD
|
|
|
|
#else
|
|
|
|
#define HTOP_HWLOC_CPUBIND_FLAG HWLOC_CPUBIND_PROCESS
|
|
|
|
#endif
|
|
|
|
#elif HAVE_LINUX_AFFINITY
|
2015-01-22 01:27:31 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "Process.h"
|
|
|
|
#include "ProcessList.h"
|
2012-12-05 15:12:20 +00:00
|
|
|
|
|
|
|
typedef struct Affinity_ {
|
2015-01-22 01:27:31 +00:00
|
|
|
ProcessList* pl;
|
2012-12-05 15:12:20 +00:00
|
|
|
int size;
|
|
|
|
int used;
|
|
|
|
int* cpus;
|
|
|
|
} Affinity;
|
|
|
|
|
|
|
|
|
2015-01-22 01:27:31 +00:00
|
|
|
Affinity* Affinity_new(ProcessList* pl);
|
2012-12-05 15:12:20 +00:00
|
|
|
|
|
|
|
void Affinity_delete(Affinity* this);
|
|
|
|
|
|
|
|
void Affinity_add(Affinity* this, int id);
|
|
|
|
|
2015-01-22 01:27:31 +00:00
|
|
|
#ifdef HAVE_LIBHWLOC
|
|
|
|
|
|
|
|
Affinity* Affinity_get(Process* proc, ProcessList* pl);
|
|
|
|
|
|
|
|
bool Affinity_set(Process* proc, Affinity* this);
|
|
|
|
|
2016-02-14 21:57:29 +00:00
|
|
|
#elif HAVE_LINUX_AFFINITY
|
2015-01-22 01:27:31 +00:00
|
|
|
|
|
|
|
Affinity* Affinity_get(Process* proc, ProcessList* pl);
|
|
|
|
|
|
|
|
bool Affinity_set(Process* proc, Affinity* this);
|
|
|
|
|
|
|
|
#endif
|
2012-12-05 15:12:20 +00:00
|
|
|
|
|
|
|
#endif
|