ARC SDK
Public Member Functions
Arc::SharedMutex Class Reference

Mutex which allows shared and exclusive locking. More...

#include <arc/Thread.h>

Public Member Functions

void lockShared (void)
 Acquire a shared lock. Blocks until exclusive lock is released. More...
 
void unlockShared (void)
 Release a shared lock. More...
 
bool isLockShared (void)
 Returns true if at least one shared lock is held. More...
 
void lockExclusive (void)
 Acquire an exclusive lock. Blocks until all shared and exclusive locks are released. More...
 
void unlockExclusive (void)
 Release exclusive lock. More...
 
bool isLockExclusive (void)
 Returns true if the exclusive lock is held. More...
 
void forceReset (void)
 This method is meant to be used only after fork. More...
 

Detailed Description

Mutex which allows shared and exclusive locking.

Member Function Documentation

◆ forceReset()

void Arc::SharedMutex::forceReset ( void  )
inline

This method is meant to be used only after fork.

It resets state of all internal locks and variables.

◆ isLockExclusive()

bool Arc::SharedMutex::isLockExclusive ( void  )
inline

Returns true if the exclusive lock is held.

◆ isLockShared()

bool Arc::SharedMutex::isLockShared ( void  )
inline

Returns true if at least one shared lock is held.

◆ lockExclusive()

void Arc::SharedMutex::lockExclusive ( void  )

Acquire an exclusive lock. Blocks until all shared and exclusive locks are released.

◆ lockShared()

void Arc::SharedMutex::lockShared ( void  )

Acquire a shared lock. Blocks until exclusive lock is released.

◆ unlockExclusive()

void Arc::SharedMutex::unlockExclusive ( void  )

Release exclusive lock.

◆ unlockShared()

void Arc::SharedMutex::unlockShared ( void  )

Release a shared lock.


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