Jeff Dike | 63ae2a9 | 2006-03-27 01:14:30 -0800 | [diff] [blame^] | 1 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) |
| 3 | * Licensed under the GPL |
| 4 | */ |
| 5 | |
| 6 | #ifndef __IRQ_USER_H__ |
| 7 | #define __IRQ_USER_H__ |
| 8 | |
Jeff Dike | 63ae2a9 | 2006-03-27 01:14:30 -0800 | [diff] [blame^] | 9 | struct irq_fd { |
| 10 | struct irq_fd *next; |
| 11 | void *id; |
| 12 | int fd; |
| 13 | int type; |
| 14 | int irq; |
| 15 | int pid; |
| 16 | int events; |
| 17 | int current_events; |
| 18 | }; |
| 19 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | enum { IRQ_READ, IRQ_WRITE }; |
| 21 | |
| 22 | extern void sigio_handler(int sig, union uml_pt_regs *regs); |
| 23 | extern int activate_fd(int irq, int fd, int type, void *dev_id); |
| 24 | extern void free_irq_by_irq_and_dev(unsigned int irq, void *dev_id); |
| 25 | extern void free_irq_by_fd(int fd); |
| 26 | extern void reactivate_fd(int fd, int irqnum); |
| 27 | extern void deactivate_fd(int fd, int irqnum); |
| 28 | extern int deactivate_all_fds(void); |
| 29 | extern void forward_interrupts(int pid); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | extern int activate_ipi(int fd, int pid); |
| 31 | extern unsigned long irq_lock(void); |
| 32 | extern void irq_unlock(unsigned long flags); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | |
Jeff Dike | 165dc59 | 2006-01-06 00:18:57 -0800 | [diff] [blame] | 34 | #endif |