From 2a4abc62b24f0af31e171508dd648690a9b0667a Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Sun, 13 Nov 2016 06:37:56 +0100 Subject: Move realtime scheduling and signal handling to common code --- src/amps/main.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'src/amps') 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 #include #include -#include -#include #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(); -- cgit v1.2.3