KDK_CPU_GET_ARCH(3) Library Functions Manual KDK_CPU_GET_ARCH(3) NAME kdk_cpu_get_arch - CPU SYNOPSIS #include extern const char* kdk_cpu_get_arch(); Link with -lkyhw. Detailed Description The main function of the interface is to obtain CPU architecture RETURN VALUE On success, returns the CPU architecture of type char*, such as "x86_64"; The return is const char*, do not free On error, return NULL. EXAMPLES #include "libkycpu.h" #include int main() { printf("%s\n", kdk_cpu_get_arch()); printf("%s\n", kdk_cpu_get_vendor()); printf("CPU %s\n", kdk_cpu_get_model()); printf("CPU %s MHz\n", kdk_cpu_get_freq_MHz()); printf("CPU %u\n", kdk_cpu_get_corenums()); printf("CPU %s\n", kdk_cpu_get_virt()); printf("CPU %u\n", kdk_cpu_get_process()); return 0; } CONFORMING TO These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: kdk_cpu_get_vendor(), kdk_cpu_get_model(), kdk_cpu_get_freq_MHz(), kdk_cpu_get_corenums(), kdk_cpu_get_virt() and kdk_cpu_get_process(). SEE ALSO kdk_cpu_get_vendor(3), kdk_cpu_get_model(3), kdk_cpu_get_freq_MHz(3), kdk_cpu_get_corenums(3), kdk_cpu_get_virt(3) and kdk_cpu_get_process(3). Linux Programmer's Manual Thu Aug 24 2023 KDK_CPU_GET_ARCH(3)