diff options
author | José Bollo <jose.bollo@iot.bzh> | 2017-04-13 10:25:16 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2017-04-13 10:25:16 +0200 |
commit | 49e6e83b203f1be3fe9488f3330c085f691a8ad5 (patch) | |
tree | d3f60f2e05ecd97fa370c80e650bb0814ea5fd0f | |
parent | 6e5acd75aee411a530c1f86fe4653e017ba0125a (diff) |
Simplification of sig-monitor
Remove unused functions
Change-Id: Ie767469a3e721aba5d9d27ab318a1d316553b2cb
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r-- | src/sig-monitor.c | 14 | ||||
-rw-r--r-- | src/sig-monitor.h | 2 |
2 files changed, 2 insertions, 14 deletions
diff --git a/src/sig-monitor.c b/src/sig-monitor.c index 89fd4444..3e16f720 100644 --- a/src/sig-monitor.c +++ b/src/sig-monitor.c @@ -164,16 +164,6 @@ void sig_monitor_clean_timeouts() void sig_monitor(int timeout, void (*function)(int sig, void*), void *arg) { - sig_monitor3(timeout, (void (*)(int,void*,void*,void*))function, arg, NULL, NULL); -} - -void sig_monitor2(int timeout, void (*function)(int sig, void*, void*), void *arg1, void *arg2) -{ - sig_monitor3(timeout, (void (*)(int,void*,void*,void*))function, arg1, arg2, NULL); -} - -void sig_monitor3(int timeout, void (*function)(int sig, void*, void*, void*), void *arg1, void *arg2, void *arg3) -{ volatile int signum, signum2; sigjmp_buf jmpbuf, *older; @@ -183,11 +173,11 @@ void sig_monitor3(int timeout, void (*function)(int sig, void*, void*, void*), v error_handler = &jmpbuf; if (timeout) timeout_arm(timeout); - function(0, arg1, arg2, arg3); + function(0, arg); } else { signum2 = setjmp(jmpbuf); if (signum2 == 0) - function(signum, arg1, arg2, arg3); + function(signum, arg); } error_handler = older; if (timeout) diff --git a/src/sig-monitor.h b/src/sig-monitor.h index a3a28bc1..6a93b799 100644 --- a/src/sig-monitor.h +++ b/src/sig-monitor.h @@ -22,6 +22,4 @@ extern void sig_monitor_clean_timeouts(); extern int sig_monitor_init_timeouts(); extern void sig_monitor(int timeout, void (*function)(int sig, void*), void *arg); -extern void sig_monitor2(int timeout, void (*function)(int sig, void*, void*), void *arg1, void *arg2); -extern void sig_monitor3(int timeout, void (*function)(int sig, void*, void*, void*), void *arg1, void *arg2, void *arg3); |