diff --git a/reactos/ntoskrnl/include/internal/ex.h b/reactos/ntoskrnl/include/internal/ex.h index 622df3c573d..b538f997537 100644 --- a/reactos/ntoskrnl/include/internal/ex.h +++ b/reactos/ntoskrnl/include/internal/ex.h @@ -104,7 +104,7 @@ typedef struct // // Detect GCC 4.1.2+ // -#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40102 +#if 1 // (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40102 // // Broken GCC with Alignment Bug. We'll do alignment ourselves at higher cost. @@ -963,7 +963,7 @@ ExReleasePushLock(PEX_PUSH_LOCK PushLock) if (OldValue.Shared > 1) { /* Decrease the share count */ - NewValue.Value = OldValue.Value &~ EX_PUSH_LOCK_SHARE_INC; + NewValue.Value = OldValue.Value - EX_PUSH_LOCK_SHARE_INC; } else { diff --git a/reactos/ntoskrnl/ke/gate.c b/reactos/ntoskrnl/ke/gate.c index ab1c72a5647..ea15bcc097e 100644 --- a/reactos/ntoskrnl/ke/gate.c +++ b/reactos/ntoskrnl/ke/gate.c @@ -21,7 +21,7 @@ KeInitializeGate(IN PKGATE Gate) /* Initialize the Dispatcher Header */ KeInitializeDispatcherHeader(&Gate->Header, GateObject, - sizeof(Gate) / sizeof(ULONG), + sizeof(KGATE) / sizeof(ULONG), 0); } @@ -170,7 +170,7 @@ KeSignalGateBoostPriority(IN PKGATE Gate) WaitThread = WaitBlock->Thread; /* Check to see if the waiting thread is locked */ - if (!KiTryThreadLock(WaitThread)) + if (KiTryThreadLock(WaitThread)) { /* Unlock the gate */ KiReleaseDispatcherObject(&Gate->Header);