Pigweed
 
Loading...
Searching...
No Matches
pw::sync::GenericBasicLockable< LockType > Class Template Reference

#include <virtual_basic_lockable.h>

Inheritance diagram for pw::sync::GenericBasicLockable< LockType >:
pw::sync::VirtualBasicLockable pw::sync::GenericLockable< InterruptSpinLock > pw::sync::GenericLockable< Mutex > pw::sync::GenericLockable< TimedMutex > pw::sync::GenericLockable< LockType > pw::sync::VirtualInterruptSpinLock pw::sync::VirtualMutex pw::sync::VirtualTimedMutex

Protected Member Functions

LockType & impl ()
 

Private Member Functions

void DoLockOperation (Operation operation) override
 

Additional Inherited Members

- Public Member Functions inherited from pw::sync::VirtualBasicLockable
void lock ()
 
void unlock ()
 
- Protected Types inherited from pw::sync::VirtualBasicLockable
enum class  Operation { kLock , kUnlock }
 

Detailed Description

template<typename LockType>
class pw::sync::GenericBasicLockable< LockType >

Templated base class to facilitate making "Virtual{LockType}" from a "LockType" class that provides lock() and unlock() methods. The resulting classes will derive from VirtualBasicLockable.

Member Function Documentation

◆ DoLockOperation()

template<typename LockType >
void pw::sync::GenericBasicLockable< LockType >::DoLockOperation ( Operation  operation)
inlineoverrideprivatevirtual

Uses a single virtual method with an enum to minimize the vtable cost per implementation of VirtualBasicLockable.

Implements pw::sync::VirtualBasicLockable.


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