Class Guarded_Semaphore

Class Guarded_Semaphore

Placement in the overall structure

Module
syscall
Base classes
Semaphore
Derived classes
None
Time of creation
Task 6
Files
guarded_semaphore.h and guarded_semaphore.cc

Description

The Guarded_Semaphore class implements the system call interface to the Semaphore class. The methods offered by Guarded_Semaphore are mapped directly to the methods of the base class, except that their execution is protected in each case with the help of an object of the Secure class.

Public methods

Guarded_Semaphore (int c)
The constructor passes only the c parameter to the base class constructor.
void p ()
see Semaphore::p ()
void v ()
see Semaphore::v ()
void wait ()
see Semaphore::wait ()
void signal ()
see Semaphore::signal ()