1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-11-10 22:59:13 +00:00

Update docs

This commit is contained in:
The Tumultuous Unicorn Of Darkness 2024-07-01 11:00:06 +02:00
parent 92bf72bf4d
commit 2dcd347807
No known key found for this signature in database
GPG key ID: 1E55EE2EFF18BC1A
3 changed files with 14 additions and 10 deletions

View file

@ -989,7 +989,8 @@ RECURSIVE = NO
# Note that relative paths are relative to the directory from which doxygen is # Note that relative paths are relative to the directory from which doxygen is
# run. # run.
EXCLUDE = EXCLUDE = @top_srcdir@/libcpuid/libcpuid_internal.h \
@top_srcdir@/libcpuid/libcpuid_util.h
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded # directories that are symbolic links (a Unix file system feature) are excluded

View file

@ -86,14 +86,15 @@
* LibCPUID provides CPU identification and access to the CPUID and RDTSC * LibCPUID provides CPU identification and access to the CPUID and RDTSC
* instructions on the x86. * instructions on the x86.
* <p> * <p>
* To execute CPUID, use \ref cpu_exec_cpuid <br> * To execute CPUID, use \ref cpu_exec_cpuid. <br>
* To execute RDTSC, use \ref cpu_rdtsc <br> * To execute RDTSC, use \ref cpu_rdtsc. <br>
* To fetch the CPUID info needed for CPU identification, use * To fetch the CPUID info needed for CPU identification, use
* \ref cpuid_get_raw_data <br> * \ref cpuid_get_raw_data or \ref cpuid_get_all_raw_data. <br>
* To make sense of that data (decode, extract features), use \ref cpu_identify <br> * To make sense of that data (decode, extract features), use
* \ref cpu_identify or \ref cpu_identify_all. <br>
* To detect the CPU speed, use either \ref cpu_clock, \ref cpu_clock_by_os, * To detect the CPU speed, use either \ref cpu_clock, \ref cpu_clock_by_os,
* \ref cpu_tsc_mark + \ref cpu_tsc_unmark + \ref cpu_clock_by_mark, * \ref cpu_tsc_mark + \ref cpu_tsc_unmark + \ref cpu_clock_by_mark,
* \ref cpu_clock_measure or \ref cpu_clock_by_ic. * \ref cpu_clock_measure, \ref cpu_clock_by_ic or \ref cpu_clock_by_tsc.
* Read carefully for pros/cons of each method. <br> * Read carefully for pros/cons of each method. <br>
* *
* To read MSRs, use \ref cpu_msr_driver_open to get a handle, and then * To read MSRs, use \ref cpu_msr_driver_open to get a handle, and then

View file

@ -63,9 +63,11 @@ typedef unsigned short uint16_t;
typedef uint16_t logical_cpu_t; typedef uint16_t logical_cpu_t;
#define __MASK_NCPUBITS 8 #define __MASK_NCPUBITS 8
#define __MASK_SETSIZE (1ULL << (sizeof(logical_cpu_t) * __MASK_NCPUBITS)) / __MASK_NCPUBITS #define __MASK_SETSIZE (1ULL << (sizeof(logical_cpu_t) * __MASK_NCPUBITS)) / __MASK_NCPUBITS
struct _cpu_affinity_mask_t { /**
uint8_t __bits[__MASK_SETSIZE]; * @brief Internal structure, used in affinity_mask_str_r and affinity_mask_str
}; */
typedef struct _cpu_affinity_mask_t cpu_affinity_mask_t; typedef struct {
uint8_t __bits[__MASK_SETSIZE]; /*!< affinity mask */
} cpu_affinity_mask_t;
#endif /* __LIBCPUID_TYPES_H__ */ #endif /* __LIBCPUID_TYPES_H__ */