diff options
Diffstat (limited to 'src/linux/api.h')
-rw-r--r-- | src/linux/api.h | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/src/linux/api.h b/src/linux/api.h index ddd3946..b853f72 100644 --- a/src/linux/api.h +++ b/src/linux/api.h @@ -8,13 +8,12 @@ #define CPUINFO_LINUX_FLAG_PRESENT UINT32_C(0x00000001) #define CPUINFO_LINUX_FLAG_POSSIBLE UINT32_C(0x00000002) #define CPUINFO_LINUX_MASK_USABLE UINT32_C(0x00000003) -#define CPUINFO_LINUX_FLAG_ONLINE UINT32_C(0x00000004) -#define CPUINFO_LINUX_FLAG_MAX_FREQUENCY UINT32_C(0x00000010) -#define CPUINFO_LINUX_FLAG_MIN_FREQUENCY UINT32_C(0x00000020) -#define CPUINFO_LINUX_FLAG_CORE_ID UINT32_C(0x00000100) -#define CPUINFO_LINUX_FLAG_CORE_CLUSTER UINT32_C(0x00000200) -#define CPUINFO_LINUX_FLAG_PACKAGE_ID UINT32_C(0x00000400) -#define CPUINFO_LINUX_FLAG_PACKAGE_CLUSTER UINT32_C(0x00000800) +#define CPUINFO_LINUX_FLAG_MAX_FREQUENCY UINT32_C(0x00000004) +#define CPUINFO_LINUX_FLAG_MIN_FREQUENCY UINT32_C(0x00000008) +#define CPUINFO_LINUX_FLAG_CORE_ID UINT32_C(0x00000010) +#define CPUINFO_LINUX_FLAG_CORE_CLUSTER UINT32_C(0x00000020) +#define CPUINFO_LINUX_FLAG_PACKAGE_ID UINT32_C(0x00000040) +#define CPUINFO_LINUX_FLAG_PACKAGE_CLUSTER UINT32_C(0x00000080) typedef bool (*cpuinfo_cpulist_callback)(uint32_t, uint32_t, void*); @@ -37,19 +36,14 @@ bool cpuinfo_linux_detect_possible_processors(uint32_t max_processors_count, bool cpuinfo_linux_detect_present_processors(uint32_t max_processors_count, uint32_t* processor0_flags, uint32_t processor_struct_size, uint32_t present_flag); +typedef bool (*cpuinfo_siblings_callback)(uint32_t, uint32_t, uint32_t, void*); bool cpuinfo_linux_detect_core_siblings( uint32_t max_processors_count, uint32_t processor, - uint32_t* processor0_flags, - uint32_t* processor0_package_id, - uint32_t* processor0_package_group_min, - uint32_t* processor0_package_group_max, - uint32_t processor_struct_size); + cpuinfo_siblings_callback callback, + void* context); bool cpuinfo_linux_detect_thread_siblings( uint32_t max_processors_count, uint32_t processor, - uint32_t* processor0_flags, - uint32_t* processor0_core_id, - uint32_t* processor0_core_group_min, - uint32_t* processor0_core_group_max, - uint32_t processor_struct_size); + cpuinfo_siblings_callback callback, + void* context); |