2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
6 #include "linux/kernel.h"
7 #include "linux/list.h"
8 #include "linux/slab.h"
14 /* Protected by sigio_lock() called from write_sigio_workaround */
15 static int sigio_irq_fd = -1;
17 void sigio_interrupt(int irq, void *data, struct pt_regs *unused)
19 read_sigio_fd(sigio_irq_fd);
20 reactivate_fd(sigio_irq_fd, SIGIO_WRITE_IRQ);
23 int write_sigio_irq(int fd)
25 if(um_request_irq(SIGIO_WRITE_IRQ, fd, IRQ_READ, sigio_interrupt,
26 SA_INTERRUPT | SA_SAMPLE_RANDOM, "write sigio",
28 printk("write_sigio_irq : um_request_irq failed\n");
35 static spinlock_t sigio_spinlock = SPIN_LOCK_UNLOCKED;
39 spin_lock(&sigio_spinlock);
42 void sigio_unlock(void)
44 spin_unlock(&sigio_spinlock);
48 * Overrides for Emacs so that we follow Linus's tabbing style.
49 * Emacs will notice this stuff at the end of the file and automatically
50 * adjust the settings for this buffer only. This must remain at the end
52 * ---------------------------------------------------------------------------
54 * c-file-style: "linux"