Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kissat3-pb2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Setting up 2FA is now mandatory for all users.
Show more breadcrumbs
Çağrı Uluç Yıldırımoğlu
Kissat3-pb2
Commits
00a3a338
Commit
00a3a338
authored
3 years ago
by
Armin Biere
Browse files
Options
Downloads
Patches
Plain Diff
inlined kissat_signal_name
parent
8cf49a43
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
VERSION
+1
-1
1 addition, 1 deletion
VERSION
src/handle.c
+0
-20
0 additions, 20 deletions
src/handle.c
src/handle.h
+24
-1
24 additions, 1 deletion
src/handle.h
test/testmain.c
+4
-4
4 additions, 4 deletions
test/testmain.c
with
29 additions
and
26 deletions
VERSION
+
1
−
1
View file @
00a3a338
sc2021-sweep
2.0.0
This diff is collapsed.
Click to expand it.
src/handle.c
+
0
−
20
View file @
00a3a338
#include
"handle.h"
#include
<assert.h>
#include
<signal.h>
#include
<stdbool.h>
#include
<stdio.h>
...
...
@@ -9,13 +8,6 @@ static void (*handler) (int);
static
volatile
int
caught_signal
;
static
volatile
bool
handler_set
;
#define SIGNALS \
SIGNAL(SIGABRT) \
SIGNAL(SIGBUS) \
SIGNAL(SIGINT) \
SIGNAL(SIGSEGV) \
SIGNAL(SIGTERM)
// *INDENT-OFF*
#define SIGNAL(SIG) \
...
...
@@ -23,18 +15,6 @@ static void (*SIG ## _handler)(int);
SIGNALS
#undef SIGNAL
const
char
*
kissat_signal_name
(
int
sig
)
{
#define SIGNAL(SIG) \
if (sig == SIG) return #SIG;
SIGNALS
#undef SIGNAL
if
(
sig
==
SIGALRM
)
return
"SIGALRM"
;
return
"SIGUNKNOWN"
;
}
void
kissat_reset_signal_handler
(
void
)
{
...
...
This diff is collapsed.
Click to expand it.
src/handle.h
+
24
−
1
View file @
00a3a338
#ifndef _handle_h_INCLUDED
#define _handle_h_INCLUDED
#include
<signal.h>
void
kissat_init_signal_handler
(
void
(
*
handler
)
(
int
));
void
kissat_reset_signal_handler
(
void
);
void
kissat_init_alarm
(
void
(
*
handler
)
(
void
));
void
kissat_reset_alarm
(
void
);
const
char
*
kissat_signal_name
(
int
sig
);
#define SIGNALS \
SIGNAL(SIGABRT) \
SIGNAL(SIGBUS) \
SIGNAL(SIGINT) \
SIGNAL(SIGSEGV) \
SIGNAL(SIGTERM)
// *INDENT-OFF*
static
inline
const
char
*
kissat_signal_name
(
int
sig
)
{
#define SIGNAL(SIG) \
if (sig == SIG) return #SIG;
SIGNALS
#undef SIGNAL
if
(
sig
==
SIGALRM
)
return
"SIGALRM"
;
return
"SIGUNKNOWN"
;
}
// *INDENT-ON*
#endif
This diff is collapsed.
Click to expand it.
test/testmain.c
+
4
−
4
View file @
00a3a338
...
...
@@ -134,7 +134,7 @@ execute_solver_and_send_signal (int sig)
#ifdef ASAN
#define SIGNALS \
#define
TEST_
SIGNALS \
SIGNAL(SIGABRT) \
SIGNAL(SIGALRM) \
SIGNAL(SIGINT) \
...
...
@@ -142,7 +142,7 @@ SIGNAL(SIGTERM)
#else
#define SIGNALS \
#define
TEST_
SIGNALS \
SIGNAL(SIGABRT) \
SIGNAL(SIGALRM) \
SIGNAL(SIGINT) \
...
...
@@ -159,7 +159,7 @@ test_main_ ## NAME (void) \
execute_solver_and_send_signal (NAME); \
}
SIGNALS
TEST_
SIGNALS
#undef SIGNAL
#endif
void
...
...
@@ -170,7 +170,7 @@ tissat_schedule_main (void)
if
(
tissat_found_test_directory
)
{
#define SIGNAL(NAME) SCHEDULE_FUNCTION (test_main_ ## NAME);
SIGNALS
TEST_
SIGNALS
#undef SIGNAL
}
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment