Determine the number of logical CPUs
Determine the number of logical CPUs
- Subject: Determine the number of logical CPUs
- From: Timothy Standing <email@hidden>
- Date: Mon, 24 Sep 2012 14:14:06 -0700
I am adding a multithreaded class to SoftRAID kext and want to allocate one thread per logical CPU (i.e. 2 threads per core if HyperThreading is present).
How can I determine the number of logical CPUs present?
I know I can search through the IORegistry for objects of type IOACPIPlatformDevice and look for the one with the highest processor-number value and then add 1 to that value. I just thought there might be some easier way.
Thanks,
Tim Standing
SoftRAID LLC
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden