HyperPlatform Programmer's Reference
Public Member Functions | Private Attributes | List of all members
PerfCollector::ScopedLock Class Reference

Scoped lock. More...

Public Member Functions

 ScopedLock (_In_ LockRoutine *lock_routine, _In_ LockRoutine *leave_routine, _In_opt_ void *lock_context)
 Acquires a lock using lock_routine. More...
 
 ~ScopedLock ()
 Releases a lock using ScopedLock::leave_routine_. More...
 

Private Attributes

LockRoutinelock_routine_
 
LockRoutineleave_routine_
 
void * lock_context_
 

Detailed Description

Scoped lock.

Definition at line 205 of file perf_counter.h.

Constructor & Destructor Documentation

◆ ScopedLock()

PerfCollector::ScopedLock::ScopedLock ( _In_ LockRoutine lock_routine,
_In_ LockRoutine leave_routine,
_In_opt_ void *  lock_context 
)
inline

Acquires a lock using lock_routine.

Parameters
lock_routineA function pointer for acquiring a lock
leave_routineA function pointer for releasing a lock
lock_contextAn arbitrary parameter for lock_enter_routine and lock_leave_routine

Definition at line 212 of file perf_counter.h.

◆ ~ScopedLock()

PerfCollector::ScopedLock::~ScopedLock ( )
inline

Releases a lock using ScopedLock::leave_routine_.

Definition at line 221 of file perf_counter.h.

Member Data Documentation

◆ leave_routine_

LockRoutine* PerfCollector::ScopedLock::leave_routine_
private

Definition at line 225 of file perf_counter.h.

◆ lock_context_

void* PerfCollector::ScopedLock::lock_context_
private

Definition at line 226 of file perf_counter.h.

◆ lock_routine_

LockRoutine* PerfCollector::ScopedLock::lock_routine_
private

Definition at line 224 of file perf_counter.h.


The documentation for this class was generated from the following file: