summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-04-10 19:13:47 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-04-10 19:13:47 +0200
commit5e533682c0df29d28dc8250c57c2e33406a57835 (patch)
tree785cb312b4e2d9aa999812b14f91444dd10f5aba /include
parentf1cdf417edeb9979a5f1f32c20d7ad75abc97a14 (diff)
include: fix the definition of device_open
Previously, every userspace server implementing the device protocol filtered the device definitions to replace the device_t type with mach_port_send_t to make the device argument of device_open polymorphic. Rather than doing that, which makes it impossible to use translation functions, fix the definition of device_open. * include/device/device.defs (device_open): Redefine the device argument to make it polymorphic unless a outran function is specified.
Diffstat (limited to 'include')
-rw-r--r--include/device/device.defs11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/device/device.defs b/include/device/device.defs
index d9234e3..5fdf1bd 100644
--- a/include/device/device.defs
+++ b/include/device/device.defs
@@ -52,7 +52,16 @@ routine device_open(
sreplyport reply_port : reply_port_t;
mode : dev_mode_t;
name : dev_name_t;
- out device : device_t
+ out device : device_t =
+ MACH_MSG_TYPE_PORT_SEND
+ ctype: mach_port_t
+#if KERNEL_SERVER
+ outtran: mach_port_t convert_device_to_port(device_t)
+#else
+#ifdef DEVICE_OUTTRAN
+ outtran: DEVICE_OUTTRAN
+#endif
+#endif /* KERNEL_SERVER */
);
routine device_close(