CNDP
22.08.0
|
Go to the source code of this file.
Functions | |
CNDP_API const char * | cne_cpu_get_flag_name (enum cne_cpu_flag_t feature) |
CNDP_API int | cne_cpu_get_flag_enabled (enum cne_cpu_flag_t feature) |
CNDP_API int | cne_cpu_is_supported (void) |
CNDP_API unsigned long | cne_cpu_getauxval (unsigned long type) |
CNDP_API int | cne_cpu_strcmp_auxval (unsigned long type, const char *str) |
CNDP_API bool | cne_cpu_rtm_is_supported (void) |
CNDP_API bool | cne_cpu_waitpkg_is_supported (void) |
CPU Flags routine for x86 archs. Gather and provide APIs to detect x86 CPU flags.
Definition in file cne_cpuflags.h.
enum cne_cpu_flag_t |
Set of flags or enums for each CPU flag ID
Definition at line 27 of file cne_cpuflags.h.
CNDP_API const char* cne_cpu_get_flag_name | ( | enum cne_cpu_flag_t | feature | ) |
Get name of CPU flag
feature | CPU flag ID |
CNDP_API int cne_cpu_get_flag_enabled | ( | enum cne_cpu_flag_t | feature | ) |
Function for checking a CPU flag availability
feature | CPU flag to query CPU for |
CNDP_API int cne_cpu_is_supported | ( | void | ) |
This function checks that the currently used CPU supports the CPU features that were specified at compile time. This version returns a result so that decisions may be made (for instance, graceful shutdowns).
CNDP_API unsigned long cne_cpu_getauxval | ( | unsigned long | type | ) |
This function attempts to retrieve a value from the auxiliary vector. If it is unsuccessful, the result will be 0, and errno will be set.
type | Type of aux value to retrieve |
CNDP_API int cne_cpu_strcmp_auxval | ( | unsigned long | type, |
const char * | str | ||
) |
This function retrieves a value from the auxiliary vector, and compares it as a string against the value retrieved.
type | Type of aux value to retrieve |
str | The string pointer to compare |
CNDP_API bool cne_cpu_rtm_is_supported | ( | void | ) |
The following cne_cpu_*_is_supported() APIs are provided to quickly determine whether a cpu flag is set. They are faster than than parsing the feature flag by name. Determine if rtm cpu flag is set
When the rtm cpu flag is set, then transactional memory instructions can be executed.
CNDP_API bool cne_cpu_waitpkg_is_supported | ( | void | ) |
Determine if waitpkg cpu flag is set
When the waitpkg cpu flag is set, then umonitor, umwait, and tpause instructions can be executed.