CpuAffinitySet.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 #ifndef SQUID_SRC_CPUAFFINITYSET_H
10 #define SQUID_SRC_CPUAFFINITYSET_H
11 
12 #include "compat/cpu.h"
13 
16 {
17 public:
19 
21  void apply();
22 
24  void undo();
25 
27  bool applied();
28 
30  void set(const cpu_set_t &aCpuSet);
31 
32 private:
35 };
36 
37 #endif /* SQUID_SRC_CPUAFFINITYSET_H */
38 
cpu affinity management for a single process
cpu_set_t theOrigCpuSet
CPU affinity for this process before apply()
void set(const cpu_set_t &aCpuSet)
set CPU affinity mask
bool applied()
whether apply() was called and was not undone
cpu_set_t theCpuSet
configured CPU affinity for this process
void undo()
undo CPU affinity changes for this process
void apply()
set CPU affinity for this process
Definition: cpu.h:21

 

Introduction

Documentation

Support

Miscellaneous