Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

RCS_SEMAPHORE Class Reference

#include <sem.hh>

Collaboration diagram for RCS_SEMAPHORE:

Collaboration graph
[legend]

Public Methods

 RCS_SEMAPHORE (unsigned long int id, int oflag, double _timeout, int mode=DEFAULT_SEM_MODE, int state=0)
 ~RCS_SEMAPHORE ()
int wait ()
int trywait ()
int post ()
int flush ()
int getvalue ()
int setflag (int oflag)
int valid ()
int clear ()

Data Fields

unsigned long int id
double timeout
int oflag
int mode
int state
rcs_sem_tsem
unsigned int sval

Private Methods

 RCS_SEMAPHORE (RCS_SEMAPHORE &sem)

Constructor & Destructor Documentation

RCS_SEMAPHORE::RCS_SEMAPHORE unsigned long int    _id,
int    _oflag,
double    _time,
int    _mode = DEFAULT_SEM_MODE,
int    _state = 0
 

Definition at line 127 of file sem.cc.

00129 {
00130   if (sem == NULL)
00131     return -1;
00132   return rcs_sem_getvalue (sem, &sval);
00133 }
00134 
00135 int
00136 RCS_SEMAPHORE::setflag (int _oflag)
00137 {
00138   oflag = _oflag;               /* we can reset whether this was the
00139                                    one who created the semaphore */
00140   return (0);
00141 }
00142 
00143 int
00144 RCS_SEMAPHORE::clear ()
00145 {
00146   return rcs_sem_clear (sem);
00147 }
00148 
00149 
00150 
00151 
00152 // This constructor declared private to prevent copying.

RCS_SEMAPHORE::~RCS_SEMAPHORE  
 

Definition at line 160 of file sem.cc.

RCS_SEMAPHORE::RCS_SEMAPHORE RCS_SEMAPHORE &    sem [private]
 

Definition at line 257 of file sem.cc.


Member Function Documentation

int RCS_SEMAPHORE::wait  
 

Definition at line 182 of file sem.cc.

Referenced by FILEMEM::lock_input(), FILEMEM::lock_output(), and SHMEM::main_access().

int RCS_SEMAPHORE::trywait  
 

Definition at line 200 of file sem.cc.

int RCS_SEMAPHORE::post  
 

Definition at line 208 of file sem.cc.

Referenced by SHMEM::main_access(), FILEMEM::unlock_input(), and FILEMEM::unlock_output().

int RCS_SEMAPHORE::flush  
 

Definition at line 220 of file sem.cc.

Referenced by SHMEM::main_access().

int RCS_SEMAPHORE::getvalue  
 

Definition at line 232 of file sem.cc.

int RCS_SEMAPHORE::setflag int    _oflag
 

Definition at line 240 of file sem.cc.

Referenced by SHMEM::close(), and FILEMEM::~FILEMEM().

int RCS_SEMAPHORE::valid  
 

Definition at line 155 of file sem.cc.

Referenced by FILEMEM::FILEMEM(), and SHMEM::open().

int RCS_SEMAPHORE::clear  
 

Definition at line 248 of file sem.cc.


Field Documentation

unsigned long int RCS_SEMAPHORE::id
 

Definition at line 146 of file sem.hh.

double RCS_SEMAPHORE::timeout
 

Definition at line 147 of file sem.hh.

Referenced by SHMEM::main_access().

int RCS_SEMAPHORE::oflag
 

Definition at line 148 of file sem.hh.

int RCS_SEMAPHORE::mode
 

Definition at line 149 of file sem.hh.

int RCS_SEMAPHORE::state
 

Definition at line 150 of file sem.hh.

rcs_sem_t* RCS_SEMAPHORE::sem
 

Definition at line 151 of file sem.hh.

unsigned int RCS_SEMAPHORE::sval
 

Definition at line 152 of file sem.hh.


The documentation for this class was generated from the following files:
Generated on Sun Dec 2 15:59:09 2001 for rcslib by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001