vrpn  07.33
Virtual Reality Peripheral Network
vrpn_Semaphore Class Reference

#include <vrpn_Shared.h>

Public Member Functions

 vrpn_Semaphore (int cNumResources=1)
 
 vrpn_Semaphore (const vrpn_Semaphore &s)
 
 ~vrpn_Semaphore ()
 
bool reset (int cNumResources=1)
 
int p ()
 
int v ()
 
int condP ()
 
int numResources ()
 

Protected Member Functions

bool init ()
 
bool destroy ()
 

Protected Attributes

int cResources
 
sem_t * semaphore
 

Detailed Description

Definition at line 487 of file vrpn_Shared.h.

Constructor & Destructor Documentation

◆ vrpn_Semaphore() [1/2]

vrpn_Semaphore::vrpn_Semaphore ( int  cNumResources = 1)

Definition at line 858 of file vrpn_Shared.C.

References init().

Here is the call graph for this function:

◆ vrpn_Semaphore() [2/2]

vrpn_Semaphore::vrpn_Semaphore ( const vrpn_Semaphore s)

Definition at line 867 of file vrpn_Shared.C.

References init().

Here is the call graph for this function:

◆ ~vrpn_Semaphore()

vrpn_Semaphore::~vrpn_Semaphore ( )

Definition at line 1002 of file vrpn_Shared.C.

References destroy().

Here is the call graph for this function:

Member Function Documentation

◆ condP()

int vrpn_Semaphore::condP ( )

Definition at line 1137 of file vrpn_Shared.C.

References ALL_ASSERT, and semaphore.

Referenced by vrpn_test_threads_and_semaphores().

◆ destroy()

bool vrpn_Semaphore::destroy ( )
protected

Definition at line 955 of file vrpn_Shared.C.

References semaphore.

Referenced by reset(), and ~vrpn_Semaphore().

◆ init()

bool vrpn_Semaphore::init ( void  )
protected

Definition at line 873 of file vrpn_Shared.C.

References cResources, and semaphore.

Referenced by reset(), and vrpn_Semaphore().

◆ numResources()

int vrpn_Semaphore::numResources ( )

Definition at line 1207 of file vrpn_Shared.C.

References cResources.

◆ p()

◆ reset()

bool vrpn_Semaphore::reset ( int  cNumResources = 1)

Definition at line 1012 of file vrpn_Shared.C.

References cResources, destroy(), and init().

Here is the call graph for this function:

◆ v()

Member Data Documentation

◆ cResources

int vrpn_Semaphore::cResources
protected

Definition at line 518 of file vrpn_Shared.h.

Referenced by init(), numResources(), and reset().

◆ semaphore

sem_t* vrpn_Semaphore::semaphore
protected

Definition at line 533 of file vrpn_Shared.h.

Referenced by condP(), destroy(), init(), p(), and v().


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