From 3272be1d2145783d88148cae04a17770390da1be Mon Sep 17 00:00:00 2001 From: Veselin Georgiev Date: Sat, 4 Mar 2017 20:22:13 +0200 Subject: [PATCH] Add comment about cpu_msrinfo() being not-threadsafe. --- libcpuid/libcpuid.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libcpuid/libcpuid.h b/libcpuid/libcpuid.h index 5ce4b89..f99c0fe 100644 --- a/libcpuid/libcpuid.h +++ b/libcpuid/libcpuid.h @@ -1100,6 +1100,8 @@ int cpu_rdmsr_range(struct msr_driver_t* handle, uint32_t msr_index, uint8_t hig * processor model, the respective value is returned. * if no information is available, or the CPU doesn't support * the query, the special value CPU_INVALID_VALUE is returned + * @note This function is not MT-safe. If you intend to call it from multiple + * threads, guard it through a mutex or a similar primitive. */ int cpu_msrinfo(struct msr_driver_t* handle, cpu_msrinfo_request_t which); #define CPU_INVALID_VALUE 0x3fffffff