summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
Diffstat (limited to 'udev')
-rw-r--r--udev/test-udev.c8
-rw-r--r--udev/udev-sysdeps.h8
-rw-r--r--udev/udevadm-monitor.c4
-rw-r--r--udev/udevadm-settle.c6
-rw-r--r--udev/udevd.c18
5 files changed, 18 insertions, 26 deletions
diff --git a/udev/test-udev.c b/udev/test-udev.c
index ff1c353e66..6ec91c174a 100644
--- a/udev/test-udev.c
+++ b/udev/test-udev.c
@@ -30,14 +30,14 @@
#include "udev.h"
-static void asmlinkage sig_handler(int signum)
+static void sig_handler(int signum)
{
switch (signum) {
case SIGALRM:
- exit(1);
+ _exit(1);
case SIGINT:
case SIGTERM:
- exit(20 + signum);
+ _exit(20 + signum);
}
}
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
/* set signal handlers */
memset(&act, 0x00, sizeof(act));
- act.sa_handler = (void (*)(int)) sig_handler;
+ act.sa_handler = sig_handler;
sigemptyset (&act.sa_mask);
act.sa_flags = 0;
sigaction(SIGALRM, &act, NULL);
diff --git a/udev/udev-sysdeps.h b/udev/udev-sysdeps.h
index e20ea48a2f..35671baca1 100644
--- a/udev/udev-sysdeps.h
+++ b/udev/udev-sysdeps.h
@@ -23,14 +23,6 @@
#include <stdint.h>
#include <errno.h>
-/* needed for our signal handlers to work */
-#undef asmlinkage
-#ifdef __i386__
-#define asmlinkage __attribute__((regparm(0)))
-#else
-#define asmlinkage
-#endif /* __i386__ */
-
#ifndef HAVE_INOTIFY
static inline int inotify_init(void)
{
diff --git a/udev/udevadm-monitor.c b/udev/udevadm-monitor.c
index 27520f7061..3f4cb5772d 100644
--- a/udev/udevadm-monitor.c
+++ b/udev/udevadm-monitor.c
@@ -35,7 +35,7 @@
static int udev_exit;
-static void asmlinkage sig_handler(int signum)
+static void sig_handler(int signum)
{
if (signum == SIGINT || signum == SIGTERM)
udev_exit = 1;
@@ -135,7 +135,7 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[])
/* set signal handlers */
memset(&act, 0x00, sizeof(struct sigaction));
- act.sa_handler = (void (*)(int)) sig_handler;
+ act.sa_handler = sig_handler;
sigemptyset(&act.sa_mask);
act.sa_flags = SA_RESTART;
sigaction(SIGINT, &act, NULL);
diff --git a/udev/udevadm-settle.c b/udev/udevadm-settle.c
index 1c3c28176b..3b26f10d50 100644
--- a/udev/udevadm-settle.c
+++ b/udev/udevadm-settle.c
@@ -36,9 +36,9 @@
#define DEFAULT_TIMEOUT 180
#define LOOP_PER_SECOND 20
-static int volatile is_timeout;
+static volatile sig_atomic_t is_timeout;
-static void asmlinkage sig_handler(int signum)
+static void sig_handler(int signum)
{
switch (signum) {
case SIGALRM:
@@ -70,7 +70,7 @@ int udevadm_settle(struct udev *udev, int argc, char *argv[])
/* set signal handlers */
memset(&act, 0x00, sizeof(act));
- act.sa_handler = (void (*)(int)) sig_handler;
+ act.sa_handler = sig_handler;
sigemptyset (&act.sa_mask);
act.sa_flags = 0;
sigaction(SIGALRM, &act, NULL);
diff --git a/udev/udevd.c b/udev/udevd.c
index ec6ee009cd..419c486ddd 100644
--- a/udev/udevd.c
+++ b/udev/udevd.c
@@ -67,10 +67,10 @@ static int debug_trace;
static struct udev_rules *rules;
static struct udev_ctrl *udev_ctrl;
static struct udev_monitor *kernel_monitor;
-static volatile int sigchilds_waiting;
-static volatile int udev_exit;
-static volatile int reload_config;
-static volatile int signal_received;
+static volatile sig_atomic_t sigchilds_waiting;
+static volatile sig_atomic_t udev_exit;
+static volatile sig_atomic_t reload_config;
+static volatile sig_atomic_t signal_received;
static volatile pid_t settle_pid;
static int run_exec_q;
static int stop_exec_q;
@@ -172,10 +172,10 @@ static void event_queue_delete(struct udev_event *event)
udev_event_unref(event);
}
-static void asmlinkage event_sig_handler(int signum)
+static void event_sig_handler(int signum)
{
if (signum == SIGALRM)
- exit(1);
+ _exit(1);
}
static void event_fork(struct udev_event *event)
@@ -202,7 +202,7 @@ static void event_fork(struct udev_event *event)
/* set signal handlers */
memset(&act, 0x00, sizeof(act));
- act.sa_handler = (void (*)(int)) event_sig_handler;
+ act.sa_handler = event_sig_handler;
sigemptyset (&act.sa_mask);
act.sa_flags = 0;
sigaction(SIGALRM, &act, NULL);
@@ -570,7 +570,7 @@ static int handle_inotify(struct udev *udev)
return 0;
}
-static void asmlinkage sig_handler(int signum)
+static void sig_handler(int signum)
{
switch (signum) {
case SIGINT:
@@ -894,7 +894,7 @@ int main(int argc, char *argv[])
/* set signal handlers */
memset(&act, 0x00, sizeof(struct sigaction));
- act.sa_handler = (void (*)(int)) sig_handler;
+ act.sa_handler = sig_handler;
sigemptyset(&act.sa_mask);
act.sa_flags = SA_RESTART;
sigaction(SIGINT, &act, NULL);