![]() |
Flowgrind
Advanced TCP traffic generator
|
CPU affinity routines used by Flowgrind. More...
Go to the source code of this file.
Enumerations | |
| enum | ncore_query { NCORE_CONFIG = 0, NCORE_CURRENT } |
| Query type for get_ncores(). More... | |
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.h.
| enum ncore_query |
Query type for get_ncores().
| Enumerator | |
|---|---|
| NCORE_CONFIG | Total number of processors configured. |
| NCORE_CURRENT | Processors available to the current process. |
Definition at line 36 of file fg_affinity.h.
| 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.