| * Copyright (C) 2002 - 2003 Jeff Dike (jdike@addtoit.com) |
| #include "linux/kernel.h" |
| #include "linux/signal.h" |
| #include "linux/interrupt.h" |
| /* Protected by sigio_lock() called from write_sigio_workaround */ |
| static int sigio_irq_fd = -1; |
| static irqreturn_t sigio_interrupt(int irq, void *data) |
| os_read_file(sigio_irq_fd, &c, sizeof(c)); |
| reactivate_fd(sigio_irq_fd, SIGIO_WRITE_IRQ); |
| int write_sigio_irq(int fd) |
| err = um_request_irq(SIGIO_WRITE_IRQ, fd, IRQ_READ, sigio_interrupt, |
| IRQF_DISABLED|IRQF_SAMPLE_RANDOM, "write sigio", |
| printk("write_sigio_irq : um_request_irq failed, err = %d\n", |
| static DEFINE_SPINLOCK(sigio_spinlock); |
| spin_lock(&sigio_spinlock); |
| spin_unlock(&sigio_spinlock); |