senf::scheduler::BlockSignals Class Reference

Temporarily block all signals. More...

#include <senf/Scheduler/Scheduler.hh>

Inheritance diagram for senf::scheduler::BlockSignals:

Public Member Functions

 BlockSignals (bool initiallyBlocked=true)
 Block signals until end of scope. More...
 
 ~BlockSignals ()
 Release all signal blocks. More...
 
void block ()
 Block signals if not blocked. More...
 
void unblock ()
 Unblock signals if blocked. More...
 
bool blocked () const
 true, if signals currently blocked, false otherwise More...
 

Detailed Description

Temporarily block all signals.

This class is used to temporarily block all signals in a critical section.

// Begin critical section
{
// critical code executed with all signals blocked
}
// End critical section
    You need to take care not to block since even the watchdog timer will be disabled while
    executing within a critical section.

Definition at line 381 of file Scheduler.hh.

Constructor & Destructor Documentation

◆ BlockSignals()

senf::scheduler::BlockSignals::BlockSignals ( bool  initiallyBlocked = true)

Block signals until end of scope.

Parameters
[in]initiallyBlockedset to false to not automatically block signals initially

Definition at line 160 of file Scheduler.cc.

◆ ~BlockSignals()

senf::scheduler::BlockSignals::~BlockSignals ( )

Release all signal blocks.

Member Function Documentation

◆ block()

void senf::scheduler::BlockSignals::block ( )

Block signals if not blocked.

Definition at line 168 of file Scheduler.cc.

◆ blocked()

bool senf::scheduler::BlockSignals::blocked ( ) const

true, if signals currently blocked, false otherwise

◆ unblock()

void senf::scheduler::BlockSignals::unblock ( )

Unblock signals if blocked.

Definition at line 176 of file Scheduler.cc.


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