2 * Copyright (C) 2002 - 2003 Jeff Dike (jdike@addtoit.com)
3 * Licensed under the GPL
6 #include "linux/kernel.h"
7 #include "linux/list.h"
8 #include "linux/slab.h"
9 #include "linux/signal.h"
10 #include "linux/interrupt.h"
16 /* Protected by sigio_lock() called from write_sigio_workaround */
17 static int sigio_irq_fd = -1;
19 static irqreturn_t sigio_interrupt(int irq, void *data, struct pt_regs *unused)
21 read_sigio_fd(sigio_irq_fd);
22 reactivate_fd(sigio_irq_fd, SIGIO_WRITE_IRQ);
26 int write_sigio_irq(int fd)
30 err = um_request_irq(SIGIO_WRITE_IRQ, fd, IRQ_READ, sigio_interrupt,
31 SA_INTERRUPT | SA_SAMPLE_RANDOM, "write sigio",
34 printk("write_sigio_irq : um_request_irq failed, err = %d\n",
42 static DEFINE_SPINLOCK(sigio_spinlock);
46 spin_lock(&sigio_spinlock);
49 void sigio_unlock(void)
51 spin_unlock(&sigio_spinlock);
55 * Overrides for Emacs so that we follow Linus's tabbing style.
56 * Emacs will notice this stuff at the end of the file and automatically
57 * adjust the settings for this buffer only. This must remain at the end
59 * ---------------------------------------------------------------------------
61 * c-file-style: "linux"