Bug 6040 – std.cpuid and core.cpuid return different values for some methods

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-05-20T10:29:00Z
Last change time
2011-09-07T22:30:08Z
Keywords
patch
Assigned to
nobody
Creator
kai

Attachments

IDFilenameSummaryContent-TypeSize
987std.cpuid.diffImplement std.cpuid in terms of core.cpuidtext/plain10618

Comments

Comment #0 by kai — 2011-05-20T10:29:14Z
Created attachment 987 Implement std.cpuid in terms of core.cpuid std.cpuid (from Phobos) duplicates functionality from core.cpuid (from druntime). Worse, some methods return different values. E.g. hyperThreading() and threadsPerCPU(). (BTW: std.cpuid.threadsPerCPU() returns 16 for my i7, which is totally wrong.) The attached patch removes the implementation from std.cpuid and uses alias to reuse core.cpuid while preserving API compatibility.
Comment #1 by clugdbug — 2011-05-20T14:48:52Z
std.cpuid should just be removed.
Comment #2 by bugzilla — 2011-09-07T22:30:08Z
Fixed 2.055