CoreLinux++  0.4.32
GuardSemaphore.hpp
1 #if !defined(__GUARDSEMAPHORE_HPP)
2 #define __GUARDSEMAPHORE_HPP
3 
4 #if !defined(__COMMON_HPP)
5 #include <Common.hpp>
6 #endif
7 
8 #if !defined(__SEMAPHORE_HPP)
9 #include <Semaphore.hpp>
10 #endif
11 
12 namespace corelinux
13 {
14  DECLARE_CLASS( GuardSemaphore );
15 
25  class GuardSemaphore : public Semaphore
26  {
27  public:
28 
29  //
30  // Constructors and destructors
31  //
32 
43  (
46  ) throw(Assertion);
47 
49 
50  virtual ~GuardSemaphore( void );
51 
52  //
53  // Mutators
54  //
55 
57 
59  throw(SemaphoreException);
60 
62 
64  throw(SemaphoreException);
65 
67 
68  virtual bool isLocked(void) ;
69 
71 
72  // virtual SemaphoreOperationStatus lockWithTimeOut( Timer )
73  // throw(SemaphoreException) = 0;
74 
76 
77  virtual SemaphoreOperationStatus release(void)
78  throw(SemaphoreException);
79 
80  protected:
81 
82  //
83  // Constructors
84  //
85 
87 
88  GuardSemaphore( void )
89  throw(Assertion);
90 
92 
94  throw(Assertion);
95 
96  //
97  // Operator overloads
98  //
100 
102  throw(Assertion);
103 
104  };
105 }
106 
107 #endif
108 
109 /*
110  Common rcs information do not modify
111  $Author: frankc $
112  $Revision: 1.2 $
113  $Date: 2000/06/02 11:51:52 $
114  $Locker: $
115 */
116 
117 
virtual ~GuardSemaphore(void)
Virtual Destructor.
Definition: GuardSemaphore.cpp:77
GuardSemaphore is a special case semaphore for use by the CoreLinuxGuardPool.
Definition: GuardSemaphore.hpp:25
SemaphoreOperationStatus
Semaphore method return enumeration.
Definition: AbstractSemaphore.hpp:39
GuardSemaphoreRef operator=(GuardSemaphoreCref)
Assignment operator throws assertion.
Forward reference the various common classes.
Definition: AbstractAllocator.hpp:32
ScalarIdentifier provides a templated interface for declaring CoreLinux Identifiers for simple scalar...
Definition: ScalarIdentifiers.hpp:37
GuardSemaphore(void)
Default constructor throws assertion.
Definition: GuardSemaphore.cpp:40
SemaphoreException is the base exception type for Semaphore.
Definition: SemaphoreException.hpp:39
A Semaphore supports the protocol that processes and/or threads agree to follow for the purpose of co...
Definition: Semaphore.hpp:61
Assertion is-a Exception created when an assertion fails.
Definition: Assertion.hpp:423
virtual bool isLocked(void)
Ask if AbstractSemaphore instance is locked.
Definition: GuardSemaphore.cpp:85
virtual SemaphoreOperationStatus lockWithWait(void)
Request the lock, wait for availability.
Definition: GuardSemaphore.cpp:94
virtual SemaphoreOperationStatus lockWithNoWait(void)
Request the lock without waiting.
Definition: GuardSemaphore.cpp:108
A SemaphoreGroup is an extension to the Linux semaphore set.
Definition: SemaphoreGroup.hpp:62
virtual SemaphoreOperationStatus release(void)
Request the AbstractSemaphore but timeout if not available.
Definition: GuardSemaphore.cpp:118

This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium