diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/device/device.defs | 18 | ||||
-rw-r--r-- | include/device/notify.defs | 36 | ||||
-rw-r--r-- | include/device/notify.h | 34 |
3 files changed, 88 insertions, 0 deletions
diff --git a/include/device/device.defs b/include/device/device.defs index 409146f5..ec4b5bf8 100644 --- a/include/device/device.defs +++ b/include/device/device.defs @@ -142,3 +142,21 @@ routine device_set_filter( in filter : filter_array_t ); +routine device_intr_register( + device : device_t; + in id : int; + in flags : int; + in receive_port : mach_port_send_t + ); + +/* + * Acknowledge the specified interrupt notification. + */ +/* + * When an IRQ happens and an intr notification is thus sent, the IRQ line + * is kept disabled until the notification is acknowledged with this RPC + */ +routine device_intr_ack( + device : device_t; + in receive_port : mach_port_send_t); + diff --git a/include/device/notify.defs b/include/device/notify.defs new file mode 100644 index 00000000..7919b339 --- /dev/null +++ b/include/device/notify.defs @@ -0,0 +1,36 @@ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ + +subsystem notify 100; + +#include <mach/std_types.defs> + +serverprefix do_; +serverdemux device_intr_notify_server; + +simpleroutine device_intr_notify( + notify : notify_port_t; + id : int); diff --git a/include/device/notify.h b/include/device/notify.h new file mode 100644 index 00000000..addf9114 --- /dev/null +++ b/include/device/notify.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2010 Free Software Foundation, Inc. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * THE FREE SOFTWARE FOUNDATIONALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY LIABILITY OF ANY KIND + * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + */ + +/* + * Device notification definitions. + */ + +#ifndef _MACH_DEVICE_NOTIFY_H_ +#define _MACH_DEVICE_NOTIFY_H_ + +#include <mach/port.h> +#include <mach/message.h> + +typedef struct +{ + mach_msg_header_t intr_header; + mach_msg_type_t intr_type; + int id; +} device_intr_notification_t; + +#define DEVICE_INTR_NOTIFY 100 + +#endif /* _MACH_DEVICE_NOTIFY_H_ */ |