Pigweed
 
Loading...
Searching...
No Matches
pw::sync::VirtualBasicLockable Class Referenceabstract

#include <virtual_basic_lockable.h>

Inheritance diagram for pw::sync::VirtualBasicLockable:
pw::sync::GenericBasicLockable< InterruptSpinLock > pw::sync::GenericBasicLockable< Mutex > pw::sync::GenericBasicLockable< TimedMutex > pw::sync::GenericBasicLockable< LockType > pw::sync::NoOpLock 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

Public Member Functions

void lock ()
 
void unlock ()
 

Protected Types

enum class  Operation { kLock , kUnlock }
 

Private Member Functions

virtual void DoLockOperation (Operation operation)=0
 

Detailed Description

The VirtualBasicLockable is a virtual lock abstraction for locks which meet the C++ named BasicLockable requirements of lock() and unlock().

This virtual indirection is useful in case you need configurable lock selection in a portable module where the final type is not defined upstream and ergo module configuration cannot be used or in case the lock type is not fixed at compile time, for example to support run time and crash time use of an object without incurring the code size hit for templating the object.

Member Function Documentation

◆ DoLockOperation()

virtual void pw::sync::VirtualBasicLockable::DoLockOperation ( Operation  operation)
privatepure virtual

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