Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FPThreadsCriticalSection Class Reference

#include <PThreadCriticalSection.h>

Public Member Functions

FORCEINLINE FPThreadsCriticalSection (void)
 
FORCEINLINE ~FPThreadsCriticalSection (void)
 
FORCEINLINE void Lock (void)
 
FORCEINLINE bool TryLock ()
 
FORCEINLINE void Unlock (void)
 

Private Member Functions

 FPThreadsCriticalSection (const FPThreadsCriticalSection &)
 
FPThreadsCriticalSectionoperator= (const FPThreadsCriticalSection &)
 

Private Attributes

pthread_mutex_t Mutex
 

Detailed Description

This is the PThreads version of a critical section. It uses pthreads to implement its locking.

Definition at line 16 of file PThreadCriticalSection.h.

Constructor & Destructor Documentation

◆ FPThreadsCriticalSection() [1/2]

FORCEINLINE FPThreadsCriticalSection::FPThreadsCriticalSection ( void )
inline

Constructor that initializes the aggregated critical section

Definition at line 28 of file PThreadCriticalSection.h.

◆ ~FPThreadsCriticalSection()

FORCEINLINE FPThreadsCriticalSection::~FPThreadsCriticalSection ( void )
inline

Destructor cleaning up the critical section

Definition at line 41 of file PThreadCriticalSection.h.

◆ FPThreadsCriticalSection() [2/2]

FPThreadsCriticalSection::FPThreadsCriticalSection ( const FPThreadsCriticalSection & )
private

Member Function Documentation

◆ Lock()

FORCEINLINE void FPThreadsCriticalSection::Lock ( void )
inline

Locks the critical section

Definition at line 49 of file PThreadCriticalSection.h.

◆ operator=()

FPThreadsCriticalSection & FPThreadsCriticalSection::operator= ( const FPThreadsCriticalSection & )
private

◆ TryLock()

FORCEINLINE bool FPThreadsCriticalSection::TryLock ( )
inline

Attempt to take a lock and returns whether or not a lock was taken.

Returns
true if a lock was taken, false otherwise.

Definition at line 59 of file PThreadCriticalSection.h.

◆ Unlock()

FORCEINLINE void FPThreadsCriticalSection::Unlock ( void )
inline

Releases the lock on the critical seciton

Definition at line 67 of file PThreadCriticalSection.h.

Member Data Documentation

◆ Mutex

pthread_mutex_t FPThreadsCriticalSection::Mutex
private

The pthread-specific critical section

Definition at line 21 of file PThreadCriticalSection.h.


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