mirror of
https://github.com/reactos/reactos.git
synced 2025-01-22 19:43:55 +08:00
[NTOSKRNL] Fix CcIdleDelay initializer for old msvc versions (#339)
[NTOSKRNL] Fix initialization of CcIdleDelay for msvc builds (fixes boot). * Introduce a macro to initialize LARGE_INTEGERs in a consistent way.
This commit is contained in:
parent
862b82f3fa
commit
9b89cd1ef2
@ -71,11 +71,7 @@ ULONG CcTotalDirtyPages = 0;
|
||||
LIST_ENTRY CcDeferredWrites;
|
||||
KSPIN_LOCK CcDeferredWriteSpinLock;
|
||||
LIST_ENTRY CcCleanSharedCacheMapList;
|
||||
#ifndef _MSC_VER
|
||||
LARGE_INTEGER CcIdleDelay = {.QuadPart = (LONGLONG)-1*1000*1000*10};
|
||||
#else
|
||||
LARGE_INTEGER CcIdleDelay = {(LONGLONG)-1*1000*1000*10};
|
||||
#endif
|
||||
LARGE_INTEGER CcIdleDelay = RTL_CONSTANT_LARGE_INTEGER((LONGLONG)-1*1000*1000*10);
|
||||
|
||||
/* Internal vars (ROS):
|
||||
* - Event to notify lazy writer to shutdown
|
||||
|
@ -403,6 +403,18 @@ extern BOOLEAN NTSYSAPI NLS_MB_OEM_CODE_PAGE_TAG;
|
||||
|
||||
#endif /* NTOS_MODE_USER */
|
||||
|
||||
//
|
||||
// Constant Large Integer Macro
|
||||
//
|
||||
#ifdef NONAMELESSUNION
|
||||
C_ASSERT(FIELD_OFFSET(LARGE_INTEGER, u.LowPart) == 0);
|
||||
#else
|
||||
C_ASSERT(FIELD_OFFSET(LARGE_INTEGER, LowPart) == 0);
|
||||
#endif
|
||||
#define RTL_CONSTANT_LARGE_INTEGER(quad_part) { { (quad_part), (quad_part)>>32 } }
|
||||
#define RTL_MAKE_LARGE_INTEGER(low_part, high_part) { { (low_part), (high_part) } }
|
||||
|
||||
|
||||
#ifdef NTOS_MODE_USER
|
||||
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user