Nebula
Loading...
Searching...
No Matches
Posix::PosixCriticalSection Class Reference

#include <posixcriticalsection.h>

Detailed Description

Posix-implementation of critical section.

Critical section objects are used to protect a portion of code from parallel execution. Define a static critical section object and use its Enter() and Leave() methods to protect critical sections of your code.

(C) 2006 Radon Labs GmbH (C) 2013-2018 Individual contributors, see AUTHORS file

Public Member Functions

 PosixCriticalSection ()
 constructor
 
 ~PosixCriticalSection ()
 destructor
 
void operator= (PosixCriticalSection &&rhs)
 copy assignment
 
void Enter () const
 enter the critical section
 
void Leave () const
 leave the critical section
 

Private Attributes

pthread_mutex_t * mutex
 

Constructor & Destructor Documentation

◆ PosixCriticalSection()

Posix::PosixCriticalSection::PosixCriticalSection ( )
inline

constructor

◆ ~PosixCriticalSection()

Posix::PosixCriticalSection::~PosixCriticalSection ( )
inline

destructor

Member Function Documentation

◆ Enter()

void Posix::PosixCriticalSection::Enter ( ) const
inline

enter the critical section

◆ Leave()

void Posix::PosixCriticalSection::Leave ( ) const
inline

leave the critical section

◆ operator=()

void Posix::PosixCriticalSection::operator= ( PosixCriticalSection && rhs)
inline

copy assignment

Member Data Documentation

◆ mutex

pthread_mutex_t* Posix::PosixCriticalSection::mutex
private

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