00001 #if !defined(__EVENTSEMAPHOREGROUP_HPP)
00002 #define __EVENTSEMAPHOREGROUP_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 DECLARE_CLASS( EventSemaphoreGroup );
00035
00043 class EventSemaphoreGroup : public SemaphoreGroup
00044 {
00045 public:
00058 EventSemaphoreGroup
00059 (
00060 Short aSemCount,
00061 Int aRightSet = OWNER_ALL
00062 ) throw(Assertion,SemaphoreException);
00063
00085 EventSemaphoreGroup
00086 (
00087 Short aSemCount,
00088 SemaphoreGroupIdentifierCref aGID,
00089 Int aRightSet,
00090 CreateDisposition disp=FAIL_IF_EXISTS
00091 ) throw(Assertion,SemaphoreException);
00092
00114 EventSemaphoreGroup
00115 (
00116 Short aSemCount,
00117 CharCptr aName,
00118 Int aRightSet,
00119 CreateDisposition disp=FAIL_IF_EXISTS
00120 ) throw(Assertion,SemaphoreException);
00121
00122
00124
00125 virtual ~EventSemaphoreGroup( void );
00126
00127
00128
00129
00130
00131
00132
00133
00134
00142 virtual AbstractSemaphorePtr createSemaphore( void )
00143 throw( SemaphoreException ) ;
00144
00154 virtual AbstractSemaphorePtr createSemaphore( Counter aLimit )
00155 throw( SemaphoreException ) ;
00156
00179 virtual AbstractSemaphorePtr createSemaphore
00180 (
00181 SemaphoreIdentifierRef aIdentifier,
00182 CreateDisposition disp = CREATE_OR_REUSE,
00183 bool Recursive = false,
00184 bool Balking = false
00185 ) throw( SemaphoreException ) ;
00186
00213 virtual AbstractSemaphorePtr createSemaphore
00214 (
00215 SemaphoreIdentifierRef aIdentifier,
00216 Counter aLimit,
00217 CreateDisposition disp = CREATE_OR_REUSE,
00218 bool Recursive = false,
00219 bool Balking = false
00220 ) throw( SemaphoreException );
00221
00244 virtual AbstractSemaphorePtr createSemaphore
00245 (
00246 std::string aName,
00247 CreateDisposition disp = CREATE_OR_REUSE,
00248 bool Recursive=false,
00249 bool Balking = false
00250 ) throw( SemaphoreException ) ;
00251
00275 virtual AbstractSemaphorePtr createSemaphore
00276 (
00277 std::string aName,
00278 Counter aLimit,
00279 CreateDisposition disp = CREATE_OR_REUSE,
00280 bool Recursive=false,
00281 bool Balking = false
00282 ) throw( SemaphoreException ) ;
00283
00284
00292 virtual void destroySemaphore( AbstractSemaphorePtr aPtr )
00293 throw( SemaphoreException ) ;
00294
00295 protected:
00296
00297
00298
00299
00301
00302 EventSemaphoreGroup( void ) throw( Assertion );
00303
00305
00306 EventSemaphoreGroup( EventSemaphoreGroupCref )
00307 throw( Assertion );
00308
00309
00310
00311
00312
00313
00314
00315 EventSemaphoreGroupRef operator=( EventSemaphoreGroupCref )
00316 throw( Assertion );
00317
00318
00319
00320
00321
00322
00323
00324 AbstractSemaphorePtr resolveSemaphore
00325 (
00326 SemaphoreIdentifierRef aIdentifier,
00327 Short aSemId,
00328 CreateDisposition aDisp,
00329 bool aRecurse,
00330 bool aBalk,
00331 Counter aMaxValue = 1
00332 ) throw( SemaphoreException ) ;
00333
00334 private:
00335
00337
00338 SemaphoreShares theUsedMap;
00339
00340 };
00341 }
00342
00343 #endif // if !defined(__EVENTSEMAPHOREGROUP_HPP)
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353