CvsiSemaphore Class Reference

#include <vsisemaphore.h>

Public Member Functions

 CvsiSemaphore (int InitialValue)
virtual ~CvsiSemaphore ()
int IsOpen ()
void P ()
void V ()

Private Attributes

sem_t m_Semaphore
int m_isopen

Detailed Description

Definition at line 28 of file vsisemaphore.h.


Constructor & Destructor Documentation

CvsiSemaphore::CvsiSemaphore ( int  InitialValue  ) 

Definition at line 30 of file vsisemaphore.cpp.

00031 {
00032   int result = sem_init(&m_Semaphore,0,InitialValue);
00033   if(result == 0)
00034   {
00035     m_isopen = true;
00036   }
00037   else
00038   {
00039     m_isopen = false;
00040   }
00041 }

CvsiSemaphore::~CvsiSemaphore (  )  [virtual]

Definition at line 43 of file vsisemaphore.cpp.

00044 {
00045   if(m_isopen)
00046   {
00047     sem_destroy(&m_Semaphore);
00048   }
00049 }


Member Function Documentation

int CvsiSemaphore::IsOpen (  ) 

Definition at line 52 of file vsisemaphore.cpp.

00053 {
00054   return m_isopen;
00055 }

void CvsiSemaphore::P (  ) 

Definition at line 57 of file vsisemaphore.cpp.

00058 {
00059   sem_wait(&m_Semaphore);
00060 }

void CvsiSemaphore::V (  ) 

Definition at line 62 of file vsisemaphore.cpp.

00063 {
00064   sem_post(&m_Semaphore);
00065 }


Field Documentation

int CvsiSemaphore::m_isopen [private]

Definition at line 38 of file vsisemaphore.h.

sem_t CvsiSemaphore::m_Semaphore [private]

Definition at line 37 of file vsisemaphore.h.


The documentation for this class was generated from the following files:
Generated on Wed Jul 4 16:03:34 2012 for RIO by  doxygen 1.6.3