This class is only available in the RT environment. It has been derived from CIIntHandler to ease the creation of an interrupt handler that processes interrupts by sending a unit to a low level semaphore. It must be used to derive an application specific semaphore interrupt handler class, or it can be used directly to control an interrupt handler object.
The class contains a static call that acts as an interrupt handler. When deriving from the CILLIntSemaphoreHandler class and overruling the handler, care should be taken in obeying all rules on the contents of such a handler.
Constructor
Destructor
Create
Release
The following member variables are only available to the members of the class and its derived classes:
CILLSemaphore * m_pSem;
All functions inherited from CIIntHandler can be used, although OnSignal implements the low level semaphore interface and is therefore essential. The Attach, Detach and Lookup functions cannot be used.
The constructor has no arguments. It does not install an interrupt handler yet.
The destructor removes the interrupt handler from the level, if one had been installed.
If a handler is currently installed, it is first removed. Then this call installs a new interrupt handler for the given level. Note that this call does not create any RT object and also does not catalog any name.
DWORD CILLIntSemaphoreHandler::Create( WORD wLevel, CILLSemaphore * pSem );
wLevel
pSem
E_OK
E_PARAM
wLevel
has a bad value, or pSem
does not point to an attached low level semaphore.
E_CONTEXT
CILLIntSemaphoreHandler::Release is called by the framework when an interrupt has occurred and a unit must be released; it should never be called explicitly. Inside this call scheduling has been stopped, so calls like releasing to a low level semaphore are allowed; do not use the address of a local variable inside this call and do not call any call that uses such an address. CILLIntSemaphoreHandler::Send releases one unit to the low level semaphore. When overruling this call, there is no need to call the default call.
void CILLIntSemaphoreHandler::Release(void);