GatewaySemaphoreGroup.hpp
#if !defined(__GATEWAYSEMAPHOREGROUP_HPP)
#define __GATEWAYSEMAPHOREGROUP_HPP
/*
CoreLinux++
Copyright (C) 1999,2000 CoreLinux Consortium
The CoreLinux++ Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The CoreLinux++ Library Library is distributed in the hope that it will
be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#if !defined(__COMMON_HPP)
#include <Common.hpp>
#endif
#if !defined(__SEMAPHOREGROUP_HPP)
#include <SemaphoreGroup.hpp>
#endif
namespace corelinux
{
DECLARE_CLASS( GatewaySemaphoreGroup );
class GatewaySemaphoreGroup : public SemaphoreGroup
{
public:
GatewaySemaphoreGroup( Short, Int Rights = OWNER_ALL )
throw(Assertion,SemaphoreException);
GatewaySemaphoreGroup
(
Short,
SemaphoreGroupIdentifierCref,
Int ,
CreateDisposition disp=FAIL_IF_EXISTS
) throw(Assertion,SemaphoreException);
GatewaySemaphoreGroup
(
Short,
CharCptr aName,
Int ,
CreateDisposition disp=FAIL_IF_EXISTS
) throw(Assertion,SemaphoreException);
virtual ~GatewaySemaphoreGroup( void );
//
// Accessors
//
//
// Factory methods
//
virtual AbstractSemaphorePtr createSemaphore( void )
throw( SemaphoreException ) ;
virtual AbstractSemaphorePtr createCountSemaphore( Count aCount )
throw( SemaphoreException ) ;
virtual AbstractSemaphorePtr createSemaphore
(
SemaphoreIdentifierRef aIdentifier,
CreateDisposition disp = CREATE_OR_REUSE,
bool Recursive = false,
bool Balking = false
) throw( SemaphoreException ) ;
virtual AbstractSemaphorePtr createCountSemaphore
(
SemaphoreIdentifierRef aIdentifier,
Count aCount,
CreateDisposition disp = CREATE_OR_REUSE,
bool Recursive = false,
bool Balking = false
) throw( SemaphoreException ) ;
virtual AbstractSemaphorePtr createSemaphore
(
std::string aName,
CreateDisposition disp = CREATE_OR_REUSE,
bool Recursive=false,
bool Balking = false
) throw( SemaphoreException ) ;
virtual void destroySemaphore( AbstractSemaphorePtr )
throw( SemaphoreException ) ;
protected:
//
// Constructors
//
GatewaySemaphoreGroup( void ) throw( Assertion );
GatewaySemaphoreGroup( GatewaySemaphoreGroupCref )
throw( Assertion );
//
// Operator overloads
//
GatewaySemaphoreGroupRef operator=( GatewaySemaphoreGroupCref )
throw( Assertion );
//
// GatewayGroup methods
//
AbstractSemaphorePtr resolveSemaphore
(
SemaphoreIdentifierRef aIdentifier,
Short aSemId,
CreateDisposition aDisp,
bool aRecurse,
bool aBalk,
Count aMaxValue = 1
) throw( SemaphoreException ) ;
private:
SemaphoreShares theUsedMap;
};
}
#endif // if !defined(__GATEWAYSEMAPHOREGROUP_HPP)
/*
Common rcs information do not modify
$Author: frankc $
$Revision: 1.4 $
$Date: 2000/06/04 22:16:32 $
$Locker: $
*/
corelinux::GatewaySemaphoreGroup::~GatewaySemaphoreGroup
virtual ~GatewaySemaphoreGroup(void)
Virtual destructor.
Definition: GatewaySemaphoreGroup.cpp:92
corelinux::GatewaySemaphoreGroup
A GatewaySemaphoreGroup is an extension to the SemaphoreGroup for creating only GatewaySemaphore type...
Definition: GatewaySemaphoreGroup.hpp:44
corelinux::GatewaySemaphoreGroup::resolveSemaphore
AbstractSemaphorePtr resolveSemaphore(SemaphoreIdentifierRef aIdentifier, Short aSemId, CreateDisposition aDisp, bool aRecurse, bool aBalk, Count aMaxValue=1)
Protected method for resolving mutex between CSA and local.
Definition: GatewaySemaphoreGroup.cpp:295
corelinux::GatewaySemaphoreGroup::createSemaphore
virtual AbstractSemaphorePtr createSemaphore(void)
Create a default GatewaySemaphore.
Definition: GatewaySemaphoreGroup.cpp:127
corelinux::GatewaySemaphoreGroup::destroySemaphore
virtual void destroySemaphore(AbstractSemaphorePtr)
Destroys a created GatewaySemaphore.
Definition: GatewaySemaphoreGroup.cpp:237
corelinux::CreateDisposition
CreateDisposition
Creation dispositions for various system utilities.
Definition: AccessRights.hpp:63
corelinux::FAIL_IF_EXISTS
Will throw exception if target exists.
Definition: AccessRights.hpp:71
corelinux::ScalarIdentifier
ScalarIdentifier provides a templated interface for declaring CoreLinux Identifiers for simple scalar...
Definition: ScalarIdentifiers.hpp:37
corelinux::AbstractSemaphore
A AbstractSemaphore supports the protocol that processes and/or threads agree to follow for the purpo...
Definition: AbstractSemaphore.hpp:85
corelinux::OWNER_ALL
Owner has read/write access.
Definition: AccessRights.hpp:43
corelinux::SemaphoreException
SemaphoreException is the base exception type for Semaphore.
Definition: SemaphoreException.hpp:39
corelinux::Assertion
Assertion is-a Exception created when an assertion fails.
Definition: Assertion.hpp:423
corelinux::CREATE_OR_REUSE
Will create or open.
Definition: AccessRights.hpp:67
corelinux::GatewaySemaphoreGroup::operator=
GatewaySemaphoreGroupRef operator=(GatewaySemaphoreGroupCref)
Assignment operator not allowed.
corelinux::GatewaySemaphoreGroup::createCountSemaphore
virtual AbstractSemaphorePtr createCountSemaphore(Count aCount)
Create a count GatewaySemaphore.
Definition: GatewaySemaphoreGroup.cpp:137
corelinux::SemaphoreGroup
A SemaphoreGroup is an extension to the Linux semaphore set.
Definition: SemaphoreGroup.hpp:62
corelinux::GatewaySemaphoreGroup::GatewaySemaphoreGroup
GatewaySemaphoreGroup(void)
Default constructor not allowed.

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