mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-27 07:53:31 +00:00
# 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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user