12 #ifndef INCLUDE_DISTORTOS_INTERNAL_SYNCHRONIZATION_SIGNALSCATCHERCONTROLBLOCK_HPP_ 13 #define INCLUDE_DISTORTOS_INTERNAL_SYNCHRONIZATION_SIGNALSCATCHERCONTROLBLOCK_HPP_ 17 #if DISTORTOS_SIGNALS_ENABLE == 1 29 class SignalsReceiverControlBlock;
30 class ThreadControlBlock;
115 std::pair<int, SignalAction>
getAssociation(uint8_t signalNumber)
const;
234 #endif // DISTORTOS_SIGNALS_ENABLE == 1 236 #endif // INCLUDE_DISTORTOS_INTERNAL_SYNCHRONIZATION_SIGNALSCATCHERCONTROLBLOCK_HPP_ SignalSet signalMask_
SignalSet with signal mask for associated thread.
Definition: SignalsCatcherControlBlock.hpp:211
void setSignalMask(SignalSet signalMask, const SignalsReceiverControlBlock *owner)
Sets signal mask for associated thread.
Definition: SignalsCatcherControlBlock.cpp:274
Association * associationsEnd_
pointer to "one past the last" element of range of Association objects
Definition: SignalsCatcherControlBlock.hpp:217
ThreadControlBlock class is a simple description of a Thread.
Definition: ThreadControlBlock.hpp:39
std::aligned_storage< sizeof(Association), alignof(Association)>::type Storage
type of uninitialized storage for Association objects
Definition: SignalsCatcherControlBlock.hpp:41
SignalAction clearAssociation(uint8_t signalNumber)
Clears association for given signal number.
Definition: SignalsCatcherControlBlock.cpp:294
SignalsCatcherControlBlock class is a structure required by threads for "catching" and "handling" of ...
Definition: SignalsCatcherControlBlock.hpp:33
std::pair< SignalSet, SignalAction > Association
association of signal numbers (as SignalSet) with SignalAction
Definition: SignalsCatcherControlBlock.hpp:38
SignalsReceiverControlBlock class is a structure required by threads for "receiving" of signals.
Definition: SignalsReceiverControlBlock.hpp:41
Association * getAssociationsBegin() const
Definition: SignalsCatcherControlBlock.hpp:188
SignalAction class header.
int requestDeliveryOfSignals(ThreadControlBlock &threadControlBlock)
Requests delivery of signals to associated thread.
Definition: SignalsCatcherControlBlock.cpp:321
std::pair< int, SignalAction > getAssociation(uint8_t signalNumber) const
Gets SignalAction associated with given signal number.
Definition: SignalsCatcherControlBlock.cpp:215
void afterGenerateQueueUnlocked(ThreadControlBlock &threadControlBlock)
Part of SignalsReceiverControlBlock::afterGenerateQueueUnlocked() specific to catching unmasked signa...
Definition: SignalsCatcherControlBlock.cpp:194
SignalSet getSignalMask() const
Definition: SignalsCatcherControlBlock.hpp:121
SignalSet class is used as a set of signals.
Definition: SignalSet.hpp:28
Top-level namespace of distortos project.
Definition: buttons.hpp:33
~SignalsCatcherControlBlock()
SignalsCatcherControlBlock's destructor.
Definition: SignalsCatcherControlBlock.cpp:189
bool deliveryIsPending_
true if signal delivery is pending, false otherwise
Definition: SignalsCatcherControlBlock.hpp:227
Storage * storageBegin_
pointer to first element of range of Storage objects
Definition: SignalsCatcherControlBlock.hpp:220
std::pair< int, SignalAction > setAssociation(uint8_t signalNumber, const SignalAction &signalAction)
Sets association for given signal number.
Definition: SignalsCatcherControlBlock.cpp:227
StorageUniquePointer storageUniquePointer_
storage for Association objects
Definition: SignalsCatcherControlBlock.hpp:208
std::unique_ptr< Storage[], void(&)(Storage *)> StorageUniquePointer
unique_ptr (with deleter) to Storage[]
Definition: SignalsCatcherControlBlock.hpp:44
SignalAction class contains information needed to handle signal that was caught.
Definition: SignalAction.hpp:30
SignalsCatcherControlBlock(StorageUniquePointer &&storageUniquePointer, size_t storageSize)
SignalsCatcherControlBlock's constructor.
Definition: SignalsCatcherControlBlock.cpp:178
void deliveryOfSignalsStartedHook()
Hook function executed when delivery of signals is started.
Definition: SignalsCatcherControlBlock.hpp:100
int beforeGenerateQueue(ThreadControlBlock &threadControlBlock)
Part of SignalsReceiverControlBlock::beforeGenerateQueue() specific to catching unmasked signals.
Definition: SignalsCatcherControlBlock.cpp:205
Storage * storageEnd_
pointer to "one past the last" element of range of Storage objects
Definition: SignalsCatcherControlBlock.hpp:224