From: Kay Sievers Date: Tue, 5 May 2009 00:39:16 +0000 (+0200) Subject: remove asmlinkage X-Git-Tag: 174~1055 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=619b97ff2b9e29c79dedd9aff425c7a11764c300;p=systemd remove asmlinkage --- diff --git a/udev/test-udev.c b/udev/test-udev.c index ff1c353e..6ec91c17 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 e20ea48a..35671bac 100644 --- a/udev/udev-sysdeps.h +++ b/udev/udev-sysdeps.h @@ -23,14 +23,6 @@ #include #include -/* 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 27520f70..3f4cb577 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 1c3c2817..3b26f10d 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 ec6ee009..419c486d 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);