Skip to main content
Pigweed's logo Pigweed
  1. Home
  2. Reference
  3. C/C++
  4. pw::sync::ExclusiveLockable< LockT > Class Template Reference
Loading...
Searching...
No Matches
pw::sync::ExclusiveLockable< LockT > Class Template Referencefinal

Overview

template<typename LockT>
class pw::sync::ExclusiveLockable< LockT >

ExclusiveLockable provides a VirtualBasicLockable API which exercises the parent SharedMutex writer API.

Inheritance diagram for pw::sync::ExclusiveLockable< LockT >:
pw::sync::VirtualBasicLockable

Public Member Functions

 ExclusiveLockable (LockT *parent)
 
 ExclusiveLockable (const ExclusiveLockable &)=delete
 
 ExclusiveLockable (ExclusiveLockable &&)=delete
 
ExclusiveLockable & operator= (const ExclusiveLockable &)=delete
 
ExclusiveLockable & operator= (ExclusiveLockable &&)=delete
 
- Public Member Functions inherited from pw::sync::VirtualBasicLockable
void lock ()
 
void unlock ()
 

Private Member Functions

void DoLockOperation (Operation operation) final
 

Additional Inherited Members

- Protected Types inherited from pw::sync::VirtualBasicLockable
enum class  Operation { kLock , kUnlock }
 

Member Function Documentation

◆ DoLockOperation()

template<typename LockT >
void pw::sync::ExclusiveLockable< LockT >::DoLockOperation ( Operation  operation)
inlinefinalprivatevirtual

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: