[Kernel] Refresh pending user data when an event is re-added
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
This commit is contained in:
parent
ef78f5d877
commit
b833771dc8
|
|
@ -1167,9 +1167,10 @@ public static class KernelEventQueueCompatExports
|
|||
}
|
||||
|
||||
var key = (ident, filter);
|
||||
var isExistingRegistration = events.ContainsKey(key);
|
||||
var isNewReadRegistration =
|
||||
filter == KernelEventFilterRead &&
|
||||
!events.ContainsKey(key);
|
||||
!isExistingRegistration;
|
||||
events[(ident, filter)] = new KernelEventRegistration(
|
||||
ident,
|
||||
filter,
|
||||
|
|
@ -1178,6 +1179,11 @@ public static class KernelEventQueueCompatExports
|
|||
lowWater,
|
||||
unchecked((ulong)Interlocked.Increment(
|
||||
ref _nextEventRegistrationGeneration)));
|
||||
if (isExistingRegistration &&
|
||||
_pendingEvents.TryGetValue(handle, out var pending))
|
||||
{
|
||||
_ = pending.UpdateUserData(ident, filter, userData);
|
||||
}
|
||||
if (isNewReadRegistration)
|
||||
{
|
||||
_readEventRegistrationCount++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue