GuardSemaphore.hpp
#if !defined(__GUARDSEMAPHORE_HPP)
#define __GUARDSEMAPHORE_HPP
#if !defined(__COMMON_HPP)
#include <Common.hpp>
#endif
#if !defined(__SEMAPHORE_HPP)
#include <Semaphore.hpp>
#endif
namespace corelinux
{
DECLARE_CLASS( GuardSemaphore );
class GuardSemaphore : public Semaphore
{
public:
//
// Constructors and destructors
//
GuardSemaphore
(
SemaphoreGroupPtr,
SemaphoreIdentifierRef
) throw(Assertion);
virtual ~GuardSemaphore( void );
//
// Mutators
//
virtual SemaphoreOperationStatus lockWithWait(void)
throw(SemaphoreException);
virtual SemaphoreOperationStatus lockWithNoWait(void)
throw(SemaphoreException);
virtual bool isLocked(void) ;
// virtual SemaphoreOperationStatus lockWithTimeOut( Timer )
// throw(SemaphoreException) = 0;
virtual SemaphoreOperationStatus release(void)
throw(SemaphoreException);
protected:
//
// Constructors
//
GuardSemaphore( void )
throw(Assertion);
GuardSemaphore( GuardSemaphoreCref )
throw(Assertion);
//
// Operator overloads
//
GuardSemaphoreRef operator=( GuardSemaphoreCref )
throw(Assertion);
};
}
#endif
/*
Common rcs information do not modify
$Author: frankc $
$Revision: 1.2 $
$Date: 2000/06/02 11:51:52 $
$Locker: $
*/
corelinux::GuardSemaphore::~GuardSemaphore
virtual ~GuardSemaphore(void)
Virtual Destructor.
Definition: GuardSemaphore.cpp:77
corelinux::GuardSemaphore
GuardSemaphore is a special case semaphore for use by the CoreLinuxGuardPool.
Definition: GuardSemaphore.hpp:25
corelinux::SemaphoreOperationStatus
SemaphoreOperationStatus
Semaphore method return enumeration.
Definition: AbstractSemaphore.hpp:39
corelinux::GuardSemaphore::operator=
GuardSemaphoreRef operator=(GuardSemaphoreCref)
Assignment operator throws assertion.
corelinux::ScalarIdentifier
ScalarIdentifier provides a templated interface for declaring CoreLinux Identifiers for simple scalar...
Definition: ScalarIdentifiers.hpp:37
corelinux::SemaphoreException
SemaphoreException is the base exception type for Semaphore.
Definition: SemaphoreException.hpp:39
corelinux::Semaphore
A Semaphore supports the protocol that processes and/or threads agree to follow for the purpose of co...
Definition: Semaphore.hpp:61
corelinux::Assertion
Assertion is-a Exception created when an assertion fails.
Definition: Assertion.hpp:423
corelinux::GuardSemaphore::isLocked
virtual bool isLocked(void)
Ask if AbstractSemaphore instance is locked.
Definition: GuardSemaphore.cpp:85
corelinux::GuardSemaphore::lockWithWait
virtual SemaphoreOperationStatus lockWithWait(void)
Request the lock, wait for availability.
Definition: GuardSemaphore.cpp:94
corelinux::GuardSemaphore::lockWithNoWait
virtual SemaphoreOperationStatus lockWithNoWait(void)
Request the lock without waiting.
Definition: GuardSemaphore.cpp:108
corelinux::SemaphoreGroup
A SemaphoreGroup is an extension to the Linux semaphore set.
Definition: SemaphoreGroup.hpp:62
corelinux::GuardSemaphore::GuardSemaphore
GuardSemaphore(SemaphoreGroupPtr, SemaphoreIdentifierRef)
Default constructor requires the identifier of the semaphore in the semaphore group.
Definition: GuardSemaphore.cpp:40
corelinux::GuardSemaphore::release
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