Skip to content

Commit

Permalink
Remove extra variable
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks committed Nov 3, 2024
1 parent a10451c commit 7d7e3f2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/inc/quic_platform_winkernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,6 @@ typedef struct CXPLAT_CQE {
typedef struct CXPLAT_SQE {
LIST_ENTRY Link;
void* UserData;
BOOLEAN IsQueued; // Prevent double queueing.
} CXPLAT_SQE;

_IRQL_requires_max_(PASSIVE_LEVEL)
Expand Down Expand Up @@ -528,12 +527,11 @@ CxPlatEventQEnqueue(
{
CxPlatLockAcquire(&queue->Lock);

if (sqe->IsQueued) {
if (sqe->Link.Flink != NULL) { // Already in a queue
CxPlatLockRelease(&queue->Lock);
return TRUE;
}

sqe->IsQueued = TRUE;
sqe->UserData = user_data;
BOOLEAN SignalEvent = IsListEmpty(&queue->Events);
InsertTailList(&queue->Events, &sqe->Link);
Expand Down Expand Up @@ -579,9 +577,7 @@ CxPlatEventQDequeue(
CXPLAT_CONTAINING_RECORD(
RemoveHeadList(&queue->Events), CXPLAT_SQE, Link);
events[EventsDequeued++].UserData = Sqe->UserData;

CXPLAT_DBG_ASSERT(Sqe->IsQueued);
Sqe->IsQueued = FALSE;
Sqe->Link.Flink = NULL; // Indicates it's not in a queue
}

CxPlatLockRelease(&queue->Lock);
Expand Down

0 comments on commit 7d7e3f2

Please sign in to comment.