Determine the number of logical CPUs
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 (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com
participants (1)
-
Timothy Standing