#include <POSIXSignal.hpp>
|
| struct | m_info_s |
| | Reduced information set from siginfo_t struct defined in signal.h. More...
|
| |
|
| | POSIXSignal ()=default |
| |
| virtual | ~POSIXSignal ()=default |
| |
| virtual sigset_t | make_sigset (const std::set< int > &signal_set) const =0 |
| | Create a sigset_t from a set of signal numbers.
|
| |
| virtual m_info_s | reduce_info (const siginfo_t &info) const =0 |
| | Extract the signal number, signal value integer and sending PID from a siginfo_t struct to simplify mock data.
|
| |
| virtual int | sig_wait_info (const sigset_t *sigset, siginfo_t *info) const =0 |
| | Wrapper for sigwaitinfo(2) that converts errors into Exceptions.
|
| |
| virtual int | sig_timed_wait (const sigset_t *sigset, siginfo_t *info, const struct timespec *timeout) const =0 |
| | Wrapper for sigtimedwait(2) that converts errors into Exceptions.
|
| |
| virtual void | sig_queue (pid_t pid, int sig, int value) const =0 |
| | Wrapper for sigqueue(3) that converts errors into Exceptions.
|
| |
| virtual void | sig_action (int signum, const struct sigaction *act, struct sigaction *oldact) const =0 |
| | Wrapper for sigaction(2) that converts errors into Exceptions.
|
| |
| virtual void | sig_proc_mask (int how, const sigset_t *sigset, sigset_t *oldset) const =0 |
| | Wrapper for sigprocmask(2) that converts errors into Exceptions.
|
| |
| virtual void | sig_suspend (const sigset_t *mask) const =0 |
| | Wrapper for sigsuspend(2) that converts errors into Exceptions.
|
| |
◆ POSIXSignal()
| geopm::POSIXSignal::POSIXSignal |
( |
| ) |
|
|
default |
◆ ~POSIXSignal()
| virtual geopm::POSIXSignal::~POSIXSignal |
( |
| ) |
|
|
virtualdefault |
◆ make_sigset()
| virtual sigset_t geopm::POSIXSignal::make_sigset |
( |
const std::set< int > & |
signal_set | ) |
const |
|
pure virtual |
Create a sigset_t from a set of signal numbers.
- Exceptions
-
- Parameters
-
| signal_set | [in]: Set of all signal numbers to add to the sigset. |
- Returns
- A sigset_t that is zeroed except for specified signals
Implemented in geopm::POSIXSignalImp.
◆ make_unique()
| std::unique_ptr< POSIXSignal > geopm::POSIXSignal::make_unique |
( |
void |
| ) |
|
|
static |
Factory method for POSIXSignal interface.
- Returns
- Unique pointer to an implementation of the POSIXSignal interface.
◆ reduce_info()
| virtual m_info_s geopm::POSIXSignal::reduce_info |
( |
const siginfo_t & |
info | ) |
const |
|
pure virtual |
Extract the signal number, signal value integer and sending PID from a siginfo_t struct to simplify mock data.
- Parameters
-
| info | [in]: see sigaction(2) man page |
- Returns
- m_info_s reduced information set from siginfo_t struct
Implemented in geopm::POSIXSignalImp.
◆ sig_action()
| virtual void geopm::POSIXSignal::sig_action |
( |
int |
signum, |
|
|
const struct sigaction * |
act, |
|
|
struct sigaction * |
oldact |
|
) |
| const |
|
pure virtual |
Wrapper for sigaction(2) that converts errors into Exceptions.
- Exceptions
-
- Warning
- The Linux API sigaction(2) does not properly implement error checking, so this function checks for EFAULT if
act or oldact are nullptr
Implemented in geopm::POSIXSignalImp.
◆ sig_proc_mask()
| virtual void geopm::POSIXSignal::sig_proc_mask |
( |
int |
how, |
|
|
const sigset_t * |
sigset, |
|
|
sigset_t * |
oldset |
|
) |
| const |
|
pure virtual |
Wrapper for sigprocmask(2) that converts errors into Exceptions.
- Exceptions
-
Implemented in geopm::POSIXSignalImp.
◆ sig_queue()
| virtual void geopm::POSIXSignal::sig_queue |
( |
pid_t |
pid, |
|
|
int |
sig, |
|
|
int |
value |
|
) |
| const |
|
pure virtual |
Wrapper for sigqueue(3) that converts errors into Exceptions.
- Exceptions
-
Implemented in geopm::POSIXSignalImp.
◆ sig_suspend()
| virtual void geopm::POSIXSignal::sig_suspend |
( |
const sigset_t * |
mask | ) |
const |
|
pure virtual |
Wrapper for sigsuspend(2) that converts errors into Exceptions.
- Exceptions
-
Implemented in geopm::POSIXSignalImp.
◆ sig_timed_wait()
| virtual int geopm::POSIXSignal::sig_timed_wait |
( |
const sigset_t * |
sigset, |
|
|
siginfo_t * |
info, |
|
|
const struct timespec * |
timeout |
|
) |
| const |
|
pure virtual |
Wrapper for sigtimedwait(2) that converts errors into Exceptions.
- Exceptions
-
Implemented in geopm::POSIXSignalImp.
◆ sig_wait_info()
| virtual int geopm::POSIXSignal::sig_wait_info |
( |
const sigset_t * |
sigset, |
|
|
siginfo_t * |
info |
|
) |
| const |
|
pure virtual |
Wrapper for sigwaitinfo(2) that converts errors into Exceptions.
- Exceptions
-
Implemented in geopm::POSIXSignalImp.
The documentation for this class was generated from the following files: