RTL_RCU_THREAD_ENTRY - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTRTL_H
#if (PHNT_VERSION >= PHNT_WINDOWS_11)
//
// Read-Copy-Update (RCU).
//
// RCU synchronization allows concurrent access to shared data structures,
// such as linked lists, trees, or hash tables, without using traditional locking methods
// in scenarios where read operations are frequent and need to be fast.
// It is particularly useful in multi-threaded environments where multiple threads
// may read from the same data structure while one or more threads may modify it.
// @remarks RCU synchronization is not for general-purpose synchronization.
// Teb->Rcu is used to store the RCU state.
#if defined(PHNT_NATIVE_RCU)

// rev
typedef struct _RTL_RCU_THREAD_ENTRY
{
    volatile ULONGLONG ReadDepth;
    ULONG ThreadCookie; // compared with TEB cached cookie
    ULONG ThreadIdLike; // compared with TEB cached id
    volatile ULONGLONG SeenEpoch; // WaitOnAddress/WakeAddressAll target
    struct _RTL_RCU_THREAD_ENTRY* Next; // linked via State->ThreadList
} RTL_RCU_THREAD_ENTRY, *PRTL_RCU_THREAD_ENTRY;

#endif
#endif
#endif

View code on GitHub

NtDoc

No description available.