MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / setupMutex

Function setupMutex

src/common/isc_sync.cpp:2293–2302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2291}
2292
2293static inline void setupMutex(FAST_MUTEX* lpMutex)
2294{
2295 SYSTEM_INFO si;
2296 GetSystemInfo(&si);
2297
2298 if (si.dwNumberOfProcessors > 1)
2299 lpMutex->lSpinCount = DEFAULT_INTERLOCKED_SPIN_COUNT_SMP;
2300 else
2301 lpMutex->lSpinCount = DEFAULT_INTERLOCKED_SPIN_COUNT;
2302}
2303
2304static bool initializeFastMutex(FAST_MUTEX* lpMutex, LPSECURITY_ATTRIBUTES lpAttributes,
2305 BOOL bInitialState, LPCSTR lpName)

Callers 1

initializeFastMutexFunction · 0.85

Calls 1

GetSystemInfoFunction · 0.85

Tested by

no test coverage detected