![]() |
Flowgrind
Advanced TCP traffic generator
|
CPU affinity routines used by Flowgrind. More...
#include "config.h"
#include <stdbool.h>
#include <errno.h>
#include <unistd.h>
#include "fg_affinity.h"
Go to the source code of this file.
Functions | |
int | get_ncores (enum ncore_query query) |
Return either the total number of configured or available cores. More... | |
int | pthread_getaffinity (pthread_t thread, unsigned *core) |
Returns the CPU affinity of thread thread in the buffer pointed to by core . More... | |
int | pthread_setaffinity (pthread_t thread, unsigned core) |
Set CPU affinity of the thread thread to the core core . More... | |
CPU affinity routines used by Flowgrind.
Definition in file fg_affinity.c.
int get_ncores | ( | enum ncore_query | query | ) |
Return either the total number of configured or available cores.
[in] | query | indicates if either the configured or available cores should be be returned |
Definition at line 56 of file fg_affinity.c.
int pthread_getaffinity | ( | pthread_t | thread, |
unsigned * | core | ||
) |
Returns the CPU affinity of thread thread
in the buffer pointed to by core
.
[in] | thread | thread ID |
[out] | core | core to which thread thread is bounded |
Definition at line 85 of file fg_affinity.c.
int pthread_setaffinity | ( | pthread_t | thread, |
unsigned | core | ||
) |
Set CPU affinity of the thread thread
to the core core
.
[in] | thread | thread ID |
[in] | core | core to which thread thread will be bounded |
Definition at line 75 of file fg_affinity.c.