mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Add cpu affinity option to supervised node config
This commit is contained in:
parent
00cd04b0ae
commit
263a5f404a
7 changed files with 94 additions and 3 deletions
15
src/zeek-affinity.h
Normal file
15
src/zeek-affinity.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
// See the file "COPYING" in the main distribution directory for copyright.
|
||||
|
||||
namespace zeek {
|
||||
|
||||
/**
|
||||
* Set the process affinity to a given CPU. Currently only supported on
|
||||
* Linux and FreeBSD.
|
||||
* @param core_number the core to which this process should set its affinity.
|
||||
* Cores are typically numbered 0..N.
|
||||
* @return true if the affinity is successfully set and false if not with
|
||||
* errno additionally being set to indicate the reason.
|
||||
*/
|
||||
bool set_affinity(int core_number);
|
||||
|
||||
} // namespace zeek
|
Loading…
Add table
Add a link
Reference in a new issue