I made a function (see below) which detects if a CPU core has Hyper-threading. When I disable Hyper-threading in the BIOS CPUID still reports that the core has Hyper-threading. How can I do this properly to find out if Hyper-threading is enabled?
// input: eax = functionnumber, ecx = 0
// output: eax = output[0], ebx = output[1], ecx = output[2], edx = output[3]
//static inline void cpuid (int output[4], int functionnumber)
bool hasHyperThreading() {
int abcd[4];
cpuid(abcd,1);
return (1<<28) & abcd[3];
}