diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2016-11-13 06:37:56 +0100 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2016-11-13 06:37:56 +0100 |
commit | 2a4abc62b24f0af31e171508dd648690a9b0667a (patch) | |
tree | b0fba143f1b96e5a4c853d7ef0a8e8a3e742648d /src/amps | |
parent | 4dacec9cebb76437cef70e42aacffbfef9658fe5 (diff) |
Move realtime scheduling and signal handling to common code
Diffstat (limited to 'src/amps')
-rw-r--r-- | src/amps/main.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/amps/main.c b/src/amps/main.c index 7561a8f..a32fdc8 100644 --- a/src/amps/main.c +++ b/src/amps/main.c @@ -22,8 +22,6 @@ #include <getopt.h> #include <stdlib.h> #include <string.h> -#include <signal.h> -#include <sched.h> #include "../common/main.h" #include "../common/debug.h" #include "../common/timer.h" @@ -357,32 +355,8 @@ int main(int argc, char *argv[]) printf("Base station on channel %d ready (%s), please tune transmitter to %.3f MHz and receiver to %.3f MHz.\n", kanal[i], chan_type_long_name(chan_type[i]), amps_channel2freq(kanal[i], 0), amps_channel2freq(kanal[i], 1)); } - signal(SIGINT,sighandler); - signal(SIGHUP,sighandler); - signal(SIGTERM,sighandler); - signal(SIGPIPE,sighandler); - - if (rt_prio > 0) { - struct sched_param schedp; - int rc; - - memset(&schedp, 0, sizeof(schedp)); - schedp.sched_priority = rt_prio; - rc = sched_setscheduler(0, SCHED_RR, &schedp); - if (rc) - fprintf(stderr, "Error setting SCHED_RR with prio %d\n", rt_prio); - } - main_loop(&quit, latency, interval, NULL); - if (rt_prio > 0) { - struct sched_param schedp; - - memset(&schedp, 0, sizeof(schedp)); - schedp.sched_priority = 0; - sched_setscheduler(0, SCHED_OTHER, &schedp); - } - fail: /* cleanup functions */ call_cleanup(); |