Bug 1031529 part 2 - Remove JS_THREADSAFE #ifdefs everywhere. r=bhackett
This commit is contained in:
@@ -33,9 +33,7 @@
|
||||
#include <stdlib.h> /* for _set_invalid_parameter_handler */
|
||||
#endif
|
||||
|
||||
#ifdef JS_THREADSAFE
|
||||
#include "prinit.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -91,9 +89,7 @@ struct CalibrationData {
|
||||
|
||||
bool calibrated;
|
||||
|
||||
#ifdef JS_THREADSAFE
|
||||
CRITICAL_SECTION data_lock;
|
||||
#endif
|
||||
};
|
||||
|
||||
static CalibrationData calibration = { 0 };
|
||||
@@ -140,9 +136,7 @@ PRMJ_NowInit()
|
||||
calibration.freq = double(liFreq.QuadPart);
|
||||
MOZ_ASSERT(calibration.freq > 0.0);
|
||||
|
||||
#ifdef JS_THREADSAFE
|
||||
InitializeCriticalSectionAndSpinCount(&calibration.data_lock, DataLockSpinCount);
|
||||
#endif
|
||||
|
||||
// Windows 8 has a new API function we can use.
|
||||
if (HMODULE h = GetModuleHandle("kernel32.dll")) {
|
||||
@@ -151,7 +145,6 @@ PRMJ_NowInit()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef JS_THREADSAFE
|
||||
void
|
||||
PRMJ_NowShutdown()
|
||||
{
|
||||
@@ -162,14 +155,6 @@ PRMJ_NowShutdown()
|
||||
#define MUTEX_UNLOCK(m) LeaveCriticalSection(m)
|
||||
#define MUTEX_SETSPINCOUNT(m, c) SetCriticalSectionSpinCount((m),(c))
|
||||
|
||||
#else
|
||||
|
||||
#define MUTEX_LOCK(m)
|
||||
#define MUTEX_UNLOCK(m)
|
||||
#define MUTEX_SETSPINCOUNT(m, c)
|
||||
|
||||
#endif
|
||||
|
||||
// Please see bug 363258 for why the win32 timing code is so complex.
|
||||
int64_t
|
||||
PRMJ_Now()
|
||||
|
||||
Reference in New Issue
Block a user