blob: 69a93c804f0e29cc1918e3919f959a42ab0d5c67 [file] [log] [blame]
Jeff Dike63ae2a92006-03-27 01:14:30 -08001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 * 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 Dike63ae2a92006-03-27 01:14:30 -08009struct 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 Torvalds1da177e2005-04-16 15:20:36 -070020enum { IRQ_READ, IRQ_WRITE };
21
22extern void sigio_handler(int sig, union uml_pt_regs *regs);
23extern int activate_fd(int irq, int fd, int type, void *dev_id);
24extern void free_irq_by_irq_and_dev(unsigned int irq, void *dev_id);
25extern void free_irq_by_fd(int fd);
26extern void reactivate_fd(int fd, int irqnum);
27extern void deactivate_fd(int fd, int irqnum);
28extern int deactivate_all_fds(void);
29extern void forward_interrupts(int pid);
Linus Torvalds1da177e2005-04-16 15:20:36 -070030extern int activate_ipi(int fd, int pid);
31extern unsigned long irq_lock(void);
32extern void irq_unlock(unsigned long flags);
Linus Torvalds1da177e2005-04-16 15:20:36 -070033
Jeff Dike165dc592006-01-06 00:18:57 -080034#endif