distortos  v0.7.0
object-oriented C++ RTOS for microcontrollers
distortos::SignalAction Class Reference

SignalAction class contains information needed to handle signal that was caught. More...

#include "distortos/SignalAction.hpp"

Collaboration diagram for distortos::SignalAction:
[legend]

Public Types

using Handler = void(const SignalInformation &)
 handler function More...
 

Public Member Functions

constexpr SignalAction ()
 SignalAction's constructor which uses "default" signal handler. More...
 
constexpr SignalAction (Handler &handler, const SignalSet signalMask)
 SignalAction's constructor. More...
 
HandlergetHandler () const
 
SignalSet getSignalMask () const
 

Private Attributes

SignalSet signalMask_
 
Handlerhandler_
 

Detailed Description

SignalAction class contains information needed to handle signal that was caught.

Similar to sigaction - http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html

Member Typedef Documentation

◆ Handler

handler function

Constructor & Destructor Documentation

◆ SignalAction() [1/2]

constexpr distortos::SignalAction::SignalAction ( )
inline

SignalAction's constructor which uses "default" signal handler.

◆ SignalAction() [2/2]

constexpr distortos::SignalAction::SignalAction ( Handler handler,
const SignalSet  signalMask 
)
inline

SignalAction's constructor.

Parameters
[in]handleris a reference to handler function (similar to sa_sigaction member of sigaction)
[in]signalMaskis the additional set of signals to be masked during execution of signal-catching function (similar to sa_mask member of sigaction)

Member Function Documentation

◆ getHandler()

Handler* distortos::SignalAction::getHandler ( ) const
inline
Returns
pointer to handler function (similar to sa_sigaction member of sigaction), nullptr if use of default handler was configured (similar to SIG_DFL)
Here is the caller graph for this function:

◆ getSignalMask()

SignalSet distortos::SignalAction::getSignalMask ( ) const
inline
Returns
additional set of signals to be masked during execution of signal-catching function (similar to sa_mask member of sigaction)
Here is the caller graph for this function:

Member Data Documentation

◆ handler_

Handler* distortos::SignalAction::handler_
private

pointer to handler function (similar to sa_sigaction member of sigaction), nullptr to use default handler (similar to SIG_DFL)

◆ signalMask_

SignalSet distortos::SignalAction::signalMask_
private

additional set of signals to be masked during execution of signal-catching function (similar to sa_mask member of sigaction)


The documentation for this class was generated from the following file: