mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 19:26:05 +00:00
- Fix broken definition of IsBoostAllowed which would cause ERESOURCE boosts to be applied backwards.
- Use cleaner, inlined definitions for ExAcquire/ReleaseResourceLock. - Convert ERESOURCE code to use a Queued In-Stack Spinlock instead of a regular spinlock. - Force usage of the spinlock instead of cli/sti for DBG builds, and enable strict sanity checks. - Fix incorrect check in ExpCheckForApcsDisabled. - Properly handle memory starvation in the contended path. - Make sure to allocate a semaphore if needed during ExAcquireSharedStarveExclusive. - Fix multiple bugs in ExIsResourceAcquiredSharedLite. - ExReleaseResourceForThreadLite didn't always properly set the ResourceOwnedExclusive flag, and didn't validate ownership. - ExSetResourceOwnerPointer wouldn't set the owner if there wasn't one already. svn path=/trunk/; revision=26654
This commit is contained in:
+347
-251
File diff suppressed because it is too large
Load Diff
@@ -25,6 +25,7 @@ extern CHAR NtBuildLab[];
|
||||
extern ULONG CmNtCSDVersion;
|
||||
extern ULONG NtGlobalFlag;
|
||||
extern ULONG ExpInitializationPhase;
|
||||
extern ULONG ExpAltTimeZoneBias;
|
||||
|
||||
typedef struct _EXHANDLE
|
||||
{
|
||||
@@ -61,18 +62,6 @@ typedef struct
|
||||
|
||||
#define MAX_FAST_REFS 7
|
||||
|
||||
/* Note: we only use a spinlock on SMP. On UP, we cli/sti intead */
|
||||
#ifndef CONFIG_SMP
|
||||
#define ExAcquireResourceLock(l, i) { \
|
||||
(void)i; \
|
||||
_disable(); \
|
||||
}
|
||||
#define ExReleaseResourceLock(l, i) _enable();
|
||||
#else
|
||||
#define ExAcquireResourceLock(l, i) KeAcquireSpinLock(l, i);
|
||||
#define ExReleaseResourceLock(l, i) KeReleaseSpinLock(l, i);
|
||||
#endif
|
||||
|
||||
#define ExAcquireRundownProtection _ExAcquireRundownProtection
|
||||
#define ExReleaseRundownProtection _ExReleaseRundownProtection
|
||||
#define ExInitializeRundownProtection _ExInitializeRundownProtection
|
||||
@@ -1012,6 +1001,18 @@ VOID
|
||||
NTAPI
|
||||
ExTimerRundown(VOID);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
HeadlessInit(
|
||||
IN PLOADER_PARAMETER_BLOCK LoaderBlock
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
XIPInit(
|
||||
IN PLOADER_PARAMETER_BLOCK LoaderBlock
|
||||
);
|
||||
|
||||
#define InterlockedDecrementUL(Addend) \
|
||||
(ULONG)InterlockedDecrement((PLONG)(Addend))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user