00001
#if !defined(__MUTEXSEMAPHOREGROUP_HPP)
00002
#define __MUTEXSEMAPHOREGROUP_HPP
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
#if !defined(__COMMON_HPP)
00025
#include <Common.hpp>
00026
#endif
00027
00028
#if !defined(__SEMAPHOREGROUP_HPP)
00029
#include <SemaphoreGroup.hpp>
00030
#endif
00031
00032
namespace corelinux
00033 {
00034
00035 DECLARE_CLASS( MutexSemaphoreGroup );
00036
00044 class MutexSemaphoreGroup :
public SemaphoreGroup
00045 {
00046
public:
00047
00060
MutexSemaphoreGroup( Short, Int Rights =
OWNER_ALL )
00061
throw(
Assertion,
SemaphoreException);
00062
00085
MutexSemaphoreGroup
00086 (
00087 Short,
00088
SemaphoreGroupIdentifierCref,
00089 Int ,
00090
CreateDisposition disp=
FAIL_IF_EXISTS
00091 )
throw(
Assertion,
SemaphoreException);
00092
00111
MutexSemaphoreGroup
00112 (
00113 Short,
00114 CharCptr,
00115 Int ,
00116
CreateDisposition disp=
FAIL_IF_EXISTS
00117 )
throw(
Assertion,
SemaphoreException);
00118
00119
00121
00122
virtual ~MutexSemaphoreGroup(
void );
00123
00124
00125
00126
00127
00128
00129
00130
00131
00138
virtual AbstractSemaphorePtr createSemaphore(
void )
00139
throw(
SemaphoreException ) ;
00140
00147
virtual AbstractSemaphorePtr createLockedSemaphore
00148 (
00149
bool Recursive =
false,
00150
bool Balking =
false
00151 )
throw(
SemaphoreException ) ;
00152
00170
virtual AbstractSemaphorePtr createSemaphore
00171 (
00172
SemaphoreIdentifierRef aIdentifier,
00173
CreateDisposition disp =
CREATE_OR_REUSE,
00174
bool Recursive =
false,
00175
bool Balking =
false
00176 )
throw(
SemaphoreException ) ;
00177
00196
virtual AbstractSemaphorePtr createLockedSemaphore
00197 (
00198
SemaphoreIdentifierRef aIdentifier,
00199
CreateDisposition disp =
CREATE_OR_REUSE,
00200
bool Recursive =
false,
00201
bool Balking =
false
00202 )
throw(
SemaphoreException ) ;
00220
virtual AbstractSemaphorePtr createSemaphore
00221 (
00222 std::string aName,
00223
CreateDisposition disp =
CREATE_OR_REUSE,
00224
bool Recursive=
false,
00225
bool Balking =
false
00226 )
throw(
SemaphoreException ) ;
00227
00228
00239
virtual void destroySemaphore(
AbstractSemaphorePtr )
00240
throw(
SemaphoreException ) ;
00241
protected:
00242
00243
00244
00245
00247
00248
MutexSemaphoreGroup(
void )
throw(
Assertion );
00249
00251
00252
MutexSemaphoreGroup(
MutexSemaphoreGroupCref )
00253
throw(
Assertion );
00254
00255
00256
00257
00258
00260
00261
MutexSemaphoreGroupRef operator=(
MutexSemaphoreGroupCref )
00262
throw(
Assertion );
00263
00265
00266
AbstractSemaphorePtr resolveSemaphore
00267 (
00268
SemaphoreIdentifierRef aIdentifier,
00269 Short aSemId,
00270
CreateDisposition aDisp,
00271
bool aRecurse,
00272
bool aBalk,
00273
bool aAutoLock =
false
00274 )
throw(
SemaphoreException ) ;
00275
00276
private:
00277
00279
00280 SemaphoreShares theUsedMap;
00281
00282 };
00283 }
00284
00285
#endif // if !defined(__MUTEXSEMAPHOREGROUP_HPP)
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295