RTL_RCU_SEGMENT - 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_SEGMENT
{
    ULONG Count;
    ULONG Reserved; // padding/unused
    PVOID Slots[ANYSIZE_ARRAY];
    //
    // Interpretation (x64):
    //   Slots[0 .. Count-1] = RTL_RCU_THREAD_ENTRY* (or NULL)
    //   Slots[Count]        = RTL_RCU_SEGMENT* link to next segment (or NULL)
    //
} RTL_RCU_SEGMENT, *PRTL_RCU_SEGMENT;

#endif
#endif
#endif

View code on GitHub

NtDoc

No description available.