# big refactoring in CPU-specific code, fix for dual core vs. HT detection

all cpu-related stuff is now defined in cpu.h (with cpu_ prefix and
fully encapsulated). fix quite brittle core/HT unit/package detection.
implement mkdir on VC8, where it is deprecated
add strdup on MacOSX
move ia32 code into separate subdir. functions implemented in asm are
called ia32_asm_*.
add some unix versions of sysdep functions (cannot test them)
timer: fix for amd64 linux

This was SVN commit r4995.
This commit is contained in:
janwas
2007-04-25 18:19:35 +00:00
parent cf21949640
commit 623e649acb
63 changed files with 1085 additions and 805 deletions
-19
View File
@@ -41,25 +41,6 @@ LibError sys_get_executable_name(char* n_path, size_t buf_size)
return INFO::OK;
}
extern int cpus;
int unix_get_cpu_info()
{
long res = sysconf(_SC_NPROCESSORS_CONF);
if (res == -1)
cpus = 1;
else
cpus = (int)res;
return 0;
}
// apparently not possible on non-Windows OSes because they seem to lack
// a CPU affinity API. see sysdep.h comment.
LibError sys_on_each_cpu(void(*cb)())
{
UNUSED2(cb);
return ERR::NO_SYS;
}
ErrorReaction sys_display_error(const wchar_t* text, uint flags)
{