libclues
Linux C++ Tracing Library
Loading...
Searching...
No Matches
sigaction.hxx
1#pragma once
2
3// C++
4#include <cstdint>
5
6// Linux
7#include <signal.h>
8
9namespace clues {
10
11extern "C" {
12
13// deprecated flag that's still set in the sigaction flags obviously
14#ifndef SA_RESTORER
15# define SA_RESTORER 0x04000000
16#endif
17
18using RestorerCB = void (*)();
19using SignalCB = void (*)(int);
20
22
27 SignalCB handler;
29 unsigned long flags;
31 RestorerCB restorer;
33 sigset_t mask;
34};
35
38 uint32_t handler;
39 uint32_t flags;
40 uint32_t restorer;
41 sigset_t mask;
42} __attribute__((packed));
43
46 uint32_t handler;
47 // old sigset_t consisting of only 4 bytes.
48 uint32_t mask;
49 uint32_t flags;
50 uint32_t restorer;
51};
52
53} // end extern "C"
54
55} // end ns
Variant of sigaction used for the old sigaction() system call.
Definition sigaction.hxx:45
Variant of sigaction for 64-bit <-> 32-bit cross ABI tracing.
Definition sigaction.hxx:37
This is the sigaction structure used by the kernel for e.g. rt_sigaction.
Definition sigaction.hxx:25
unsigned long flags
The sigaction flags.
Definition sigaction.hxx:29
sigset_t mask
The signal mask.
Definition sigaction.hxx:33
SignalCB handler
The signal handling function be it the old or the new signature.
Definition sigaction.hxx:27
RestorerCB restorer
The restorer function (deprecated).
Definition sigaction.hxx:31