Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[linux-drm-fsl-dcu.git] / arch / um / os-Linux / irq.c
index 7555bf9c33d90670bf11deaf2046e034e4ef882f..d1b61d474e0a0a535423f74b097b851bf0b05677 100644 (file)
 #include "sigio.h"
 #include "irq_user.h"
 #include "os.h"
+#include "um_malloc.h"
 
+/*
+ * Locked by irq_lock in arch/um/kernel/irq.c.  Changed by os_create_pollfd
+ * and os_free_irq_by_cb, which are called under irq_lock.
+ */
 static struct pollfd *pollfds = NULL;
 static int pollfds_num = 0;
 static int pollfds_size = 0;
@@ -57,7 +62,7 @@ int os_create_pollfd(int fd, int events, void *tmp_pfd, int size_tmpfds)
        if (pollfds_num == pollfds_size) {
                if (size_tmpfds <= pollfds_size * sizeof(pollfds[0])) {
                        /* return min size needed for new pollfds area */
-                       return((pollfds_size + 1) * sizeof(pollfds[0]));
+                       return (pollfds_size + 1) * sizeof(pollfds[0]);
                }
 
                if (pollfds != NULL) {
@@ -132,7 +137,7 @@ void os_set_pollfd(int i, int fd)
 
 void os_set_ioignore(void)
 {
-       set_handler(SIGIO, SIG_IGN, 0, -1);
+       signal(SIGIO, SIG_IGN);
 }
 
 void init_irq_signals(int on_sigstack)