]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/CpuAffinityMap.h
2 * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
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.
9 #ifndef SQUID_CPU_AFFINITY_MAP_H
10 #define SQUID_CPU_AFFINITY_MAP_H
16 /// stores cpu_affinity_map configuration
20 /// append cpu_affinity_map option
21 bool add(const std::vector
<int> &aProcesses
, const std::vector
<int> &aCores
);
23 /// calculate CPU set for this process
24 CpuAffinitySet
*calculateSet(const int targetProcess
) const;
26 /// returns list of process numbers
27 const std::vector
<int> &processes() const { return theProcesses
; }
29 /// returns list of cores
30 const std::vector
<int> &cores() const { return theCores
; }
33 std::vector
<int> theProcesses
; ///< list of process numbers
34 std::vector
<int> theCores
; ///< list of cores
37 #endif // SQUID_CPU_AFFINITY_MAP_H