InitializeSRWLock

InitializeSRWLock initializes an SRW lock to an unlocked, uncontended state. This function must be called before any other SRW lock operations.

Syntax

VOID InitializeSRWLock(
    PSRWLOCK pSrwLock
);

Parameters

pSrwLock

A pointer to the SRWLOCK structure.

Return Value

This function does not return a value.

Remarks

Requirements

Minimum Supported Version RTX64 4.5.5
Header windows.h
Library Rtx_Rtss.lib

Example

Copy
SRWLOCK lock;
InitializeSRWLock(&lock);

See Also: