blob: 15ca5fd9c7b1606373e061d34e28a592c6aec591 [file] [log] [blame] [raw]
/* Do not edit this file. It was automatically generated. */
#ifndef HEADER_Affinity
#define HEADER_Affinity
/*
htop - Affinity.h
(C) 2004-2011 Hisham H. Muhammad
Copyright 2015-2022 Rivoreo
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/
#ifdef HAVE_LIBHWLOC
#ifdef __linux__
#define HTOP_HWLOC_CPUBIND_FLAG HWLOC_CPUBIND_THREAD
#else
#define HTOP_HWLOC_CPUBIND_FLAG HWLOC_CPUBIND_PROCESS
#endif
#elif defined HAVE_LINUX_AFFINITY
#elif defined HAVE_KFREEBSD_CPUSET
#endif
#include "Process.h"
#include "ProcessList.h"
typedef struct Affinity_ {
const ProcessList *pl;
int size;
int used;
int* cpus;
} Affinity;
Affinity* Affinity_new(const ProcessList *pl);
void Affinity_delete(Affinity* this);
void Affinity_add(Affinity* this, int id);
#ifdef HAVE_LIBHWLOC
Affinity* Affinity_get(const Process *proc, const ProcessList *pl);
bool Affinity_set(const Process *proc, Affinity *affinity);
#elif defined HAVE_LINUX_AFFINITY
Affinity* Affinity_get(const Process *proc, const ProcessList *pl);
bool Affinity_set(const Process *proc, Affinity *affinity);
#elif defined HAVE_KFREEBSD_CPUSET
Affinity *Affinity_get(const Process *proc, const ProcessList *pl);
bool Affinity_set(const Process *proc, Affinity *affinity);
#endif
#endif