Fix size returned by os_critsecsize() and construct type for D_CRITIAL_SECTION on Windows.

This commit is contained in:
kai
2012-09-08 11:49:37 +02:00
parent e333b76759
commit 4ae64dd2e7
3 changed files with 35 additions and 10 deletions

View File

@@ -44,11 +44,11 @@
int os_critsecsize()
{
#if defined(_MSC_VER)
// TODO Check size
return 68;
// Return sizeof(RTL_CRITICAL_SECTION)
return global.params.is64bit ? 40 : 24;
#else
if (global.params.os == OSWindows)
return 68;
return global.params.is64bit ? 40 : 24;
else if (global.params.os == OSFreeBSD)
return sizeof(size_t);
else