William A. Rowe, Jr. wrote:
Martin Sebor wrote:
Here are a couple of articles from the Intel Knowledge Base that don't
appear to come with a restrictive license or even a copyright. The code
is Windows-specific but it should be possible to translate it to
something understandable to gcc and other compilers (Sun C++ on x86).
How to Determine Whether a Processor Supports Hyper-Threading Technology:
http://www3.intel.com/cd/ids/developer/asmo-na/eng/dc/threading/knowledgebase/43843.htm
How to Determine the Number of Logical Processors per Physical
Processor:
http://www.intel.com/cd/ids/developer/asmo-na/eng/dc/threading/knowledgebase/43842.htm
If you are looking for BSD-license compatible logic for this, I'm just
guessing that the BSD OS sources themselves might be a great resource.
Good suggestion!
Thanks!
Martin