25#define InterlockedAndPointer(ptr,val) InterlockedAnd64((PLONGLONG)ptr,(LONGLONG)val)
27#define InterlockedAndPointer(ptr,val) InterlockedAnd((PLONG)ptr,(LONG)val)
93 NewValue.
Value = OldValue.
Value &~ EX_PUSH_LOCK_WAKING;
113 WaitBlock = FirstWaitBlock;
119 LastWaitBlock = WaitBlock->Last;
125 WaitBlock = LastWaitBlock;
130 PreviousWaitBlock = WaitBlock;
133 WaitBlock = WaitBlock->Next;
136 WaitBlock->Previous = PreviousWaitBlock;
140 PreviousWaitBlock = WaitBlock->Previous;
142 !(PreviousWaitBlock))
160 FirstWaitBlock->Last = PreviousWaitBlock;
161 WaitBlock->Previous =
NULL;
164 ASSERT(FirstWaitBlock != WaitBlock);
177 if (WaitBlock->Previous)
187 PreviousWaitBlock = WaitBlock->Previous;
190 ASSERT(!WaitBlock->Signaled);
194 WaitBlock->Signaled =
TRUE;
205 WaitBlock = PreviousWaitBlock;
206 if (!WaitBlock)
break;
254 FirstWaitBlock = WaitBlock;
258 LastWaitBlock = WaitBlock->Last;
262 FirstWaitBlock->Last = LastWaitBlock;
267 PreviousWaitBlock = WaitBlock;
270 WaitBlock = WaitBlock->Next;
273 WaitBlock->Previous = PreviousWaitBlock;
277 NewValue.
Value = OldValue.
Value &~ EX_PUSH_LOCK_WAKING;
433 OldValue = *PushLock;
439 WaitBlock->Next = OldValue.
Ptr;
445 if (OldValue.
Ptr == NewValue.
Ptr)
break;
491 OldValue.
Ptr) != OldValue.
Ptr)
494 OldValue = *PushLock;
506 WaitBlock->Previous =
NULL;
513 WaitBlock->Last =
NULL;
516 WaitBlock->ShareCount = 0;
535 WaitBlock->Last = WaitBlock;
538 WaitBlock->ShareCount = (
LONG)OldValue.
Shared;
552 WaitBlock->ShareCount = 0;
563 WaitBlock->Signaled = 0;
564 WaitBlock->OldValue = OldValue;
565 WaitBlock->NewValue = NewValue;
566 WaitBlock->PushLock = PushLock;
574 TempValue = NewValue;
578 if (NewValue.Value != OldValue.
Value)
581 OldValue = *PushLock;
616 ASSERT(WaitBlock->Signaled);
620 ASSERT((WaitBlock->ShareCount == 0));
678 if (NewValue.Value != OldValue.
Value)
681 OldValue = *PushLock;
692 WaitBlock->ShareCount = 0;
694 WaitBlock->Previous =
NULL;
704 WaitBlock->Last =
NULL;
719 WaitBlock->Last = WaitBlock;
732 WaitBlock->Signaled = 0;
733 WaitBlock->OldValue = OldValue;
734 WaitBlock->NewValue = NewValue;
735 WaitBlock->PushLock = PushLock;
742 if (NewValue.Ptr != OldValue.
Ptr)
745 OldValue = *PushLock;
783 ASSERT(WaitBlock->Signaled);
787 ASSERT((WaitBlock->ShareCount == 0));
841 if (NewValue.Value == OldValue.
Value)
return;
859 LastWaitBlock = WaitBlock->Last;
865 WaitBlock = LastWaitBlock;
870 WaitBlock = WaitBlock->Next;
874 if (WaitBlock->ShareCount > 0)
897 NewValue.Value = OldValue.
Value;
898 NewValue.MultipleShared =
FALSE;
899 NewValue.Locked =
FALSE;
902 ASSERT(NewValue.Waking && !NewValue.Locked && !NewValue.MultipleShared);
908 if (NewValue.Value == OldValue.
Value)
return;
913 NewValue.Value = OldValue.
Value;
914 NewValue.MultipleShared =
FALSE;
915 NewValue.Locked =
FALSE;
918 NewValue.Waking =
TRUE;
921 ASSERT(NewValue.Waking && !NewValue.Locked && !NewValue.MultipleShared);
924 WakeValue = NewValue;
928 if (NewValue.Value != OldValue.
Value)
continue;
981 if (NewValue.Value == OldValue.
Value)
return;
998 LastWaitBlock = WaitBlock->Last;
1004 WaitBlock = LastWaitBlock;
1009 WaitBlock = WaitBlock->Next;
1013 ASSERT(WaitBlock->ShareCount > 0);
1033 NewValue.Value = OldValue.
Value;
1034 NewValue.MultipleShared =
FALSE;
1035 NewValue.Locked =
FALSE;
1038 ASSERT(NewValue.Waking && !NewValue.Locked && !NewValue.MultipleShared);
1044 if (NewValue.Value == OldValue.
Value)
return;
1049 NewValue.Value = OldValue.
Value;
1050 NewValue.MultipleShared =
FALSE;
1051 NewValue.Locked =
FALSE;
1054 NewValue.Waking =
TRUE;
1057 ASSERT(NewValue.Waking && !NewValue.Locked && !NewValue.MultipleShared);
1060 WakeValue = NewValue;
1064 if (NewValue.Value != OldValue.
Value)
continue;
1107 NewValue.
Value = (OldValue.
Value &~ EX_PUSH_LOCK_LOCK) |
1114 WakeValue = NewValue;
1130 NewValue.
Value = OldValue.
Value &~ EX_PUSH_LOCK_LOCK;
1145 OldValue = NewValue;
1176 NewValue = OldValue;
1182 OldValue.
Ptr) == OldValue.
Ptr)
1206 PVOID CurrentWaitBlock)
1222 NextWaitBlock = WaitBlock->Next;
1232 WaitBlock = NextWaitBlock;
1240 if ((CurrentWaitBlock) &&
#define EX_PUSH_LOCK_PTR_BITS
#define EX_PUSH_LOCK_LOCK
#define EX_PUSH_LOCK_MULTIPLE_SHARED
#define EX_PUSH_LOCK_WAITING
#define EX_PUSH_LOCK_WAKING
#define InterlockedDecrement
#define InterlockedExchangePointer(Target, Value)
#define KeRaiseIrql(irql, oldIrql)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeInitializeEvent(pEvt, foo, foo2)
#define KeLowerIrql(oldIrql)
VOID NTAPI KeSetEventBoostPriority(IN PKEVENT Event, IN PKTHREAD *WaitingThread OPTIONAL)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define InterlockedCompareExchangePointer
#define InterlockedBitTestAndReset
#define EX_PUSH_LOCK_FLAGS_WAIT_V
* PEX_PUSH_LOCK_WAIT_BLOCK
#define EX_PUSH_LOCK_FLAGS_EXCLUSIVE
#define EX_PUSH_LOCK_FLAGS_WAIT
VOID FASTCALL KeWaitForGate(PKGATE Gate, KWAIT_REASON WaitReason, KPROCESSOR_MODE WaitMode)
VOID FASTCALL KeSignalGateBoostPriority(PKGATE Gate)
VOID FASTCALL KeInitializeGate(PKGATE Gate)
NTSTATUS FASTCALL ExTimedWaitForUnblockPushLock(IN PEX_PUSH_LOCK PushLock, IN PVOID WaitBlock, IN PLARGE_INTEGER Timeout)
VOID FASTCALL ExfReleasePushLock(PEX_PUSH_LOCK PushLock)
VOID NTAPI ExpInitializePushLocks(VOID)
VOID FASTCALL ExpOptimizePushLockList(PEX_PUSH_LOCK PushLock, EX_PUSH_LOCK OldValue)
VOID FASTCALL ExWaitForUnblockPushLock(IN PEX_PUSH_LOCK PushLock, IN PVOID WaitBlock)
VOID FASTCALL ExfTryToWakePushLock(PEX_PUSH_LOCK PushLock)
VOID FASTCALL ExfReleasePushLockShared(PEX_PUSH_LOCK PushLock)
VOID FASTCALL ExfReleasePushLockExclusive(PEX_PUSH_LOCK PushLock)
ULONG ExPushLockSpinCount
VOID FASTCALL ExfWakePushLock(PEX_PUSH_LOCK PushLock, EX_PUSH_LOCK OldValue)
VOID FASTCALL ExfAcquirePushLockExclusive(PEX_PUSH_LOCK PushLock)
VOID FASTCALL ExfUnblockPushLock(PEX_PUSH_LOCK PushLock, PVOID CurrentWaitBlock)
VOID FASTCALL ExBlockPushLock(PEX_PUSH_LOCK PushLock, PVOID pWaitBlock)
#define InterlockedAndPointer(ptr, val)
VOID FASTCALL ExfAcquirePushLockShared(PEX_PUSH_LOCK PushLock)
_Must_inspect_result_ _In_ ULONG Flags
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql