ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
CaDiCaL::Signal Class Reference

#include <signal.hpp>

Static Public Member Functions

static void set (Handler *)
 
static void reset ()
 
static void alarm (int seconds)
 
static void reset_alarm ()
 
static const char * name (int sig)
 

Detailed Description

Definition at line 22 of file signal.hpp.

Member Function Documentation

◆ alarm()

void CaDiCaL::Signal::alarm ( int seconds)
static

Definition at line 130 of file cadical_signal.cpp.

130 {
131 CADICAL_assert (seconds >= 0);
132 CADICAL_assert (!alarm_set);
133 CADICAL_assert (alarm_time < 0);
134 SIGALRM_handler = signal (SIGALRM, catch_signal);
135 alarm_set = true;
136 alarm_time = absolute_real_time () + seconds;
137 ::alarm (seconds);
138}
#define CADICAL_assert(ignore)
Definition global.h:14
static void alarm(int seconds)
double absolute_real_time()
int64_t seconds
Definition rrrTypes.h:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ name()

const char * CaDiCaL::Signal::name ( int sig)
static

Definition at line 80 of file cadical_signal.cpp.

80 {
81#define SIGNAL(SIG) \
82 if (sig == SIG) \
83 return #SIG;
85#undef SIGNAL
86#ifndef WIN32
87 if (sig == SIGALRM)
88 return "SIGALRM";
89#endif
90 return "UNKNOWN";
91}
#define SIGNALS

◆ reset()

void CaDiCaL::Signal::reset ( )
static

Definition at line 67 of file cadical_signal.cpp.

67 {
68 signal_handler = 0;
69#define SIGNAL(SIG) \
70 (void) signal (SIG, SIG##_handler); \
71 SIG##_handler = 0;
73#undef SIGNAL
74#ifndef WIN32
75 reset_alarm ();
76#endif
77 caught_signal = false;
78}
static void reset_alarm()
Here is the call graph for this function:

◆ reset_alarm()

void CaDiCaL::Signal::reset_alarm ( )
static

Definition at line 55 of file cadical_signal.cpp.

55 {
56 if (!alarm_set)
57 return;
58 (void) signal (SIGALRM, SIGALRM_handler);
59 SIGALRM_handler = 0;
60 caught_alarm = false;
61 alarm_set = false;
62 alarm_time = -1;
63}
Here is the caller graph for this function:

◆ set()

void CaDiCaL::Signal::set ( Handler * h)
static

Definition at line 121 of file cadical_signal.cpp.

121 {
122 signal_handler = h;
123#define SIGNAL(SIG) SIG##_handler = signal (SIG, catch_signal);
124 SIGNALS
125#undef SIGNAL
126}

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