summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-04-08 15:40:42 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-04-08 15:40:42 +0200
commitf1cdf417edeb9979a5f1f32c20d7ad75abc97a14 (patch)
tree144c385b08198a7a580b49e4012fe895148ab0cd /include
parent119294278af2390971305224c9772d89525d97e1 (diff)
include: make the device_t types translation functions mutable
Make the intran, outtran and destructor functions mutable using preprocessor macros. Make it possible to inject imports using the DEVICE_IMPORTS macro. This way, userspace servers can provide their own translation functions. * include/device/device_types.defs: Honor DEVICE_IMPORTS. (device_t): Make the translation mutable using preprocessor macros.
Diffstat (limited to 'include')
-rw-r--r--include/device/device_types.defs14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/device/device_types.defs b/include/device/device_types.defs
index 79e4c5b..ff6cff6 100644
--- a/include/device/device_types.defs
+++ b/include/device/device_types.defs
@@ -39,6 +39,10 @@
#include <mach/std_types.defs>
+#ifdef DEVICE_IMPORTS
+DEVICE_IMPORTS
+#endif
+
type recnum_t = unsigned32;
type dev_mode_t = unsigned32;
type dev_flavor_t = unsigned32;
@@ -55,6 +59,16 @@ type device_t = mach_port_t
intran: device_t dev_port_lookup(mach_port_t)
outtran: mach_port_t convert_device_to_port(device_t)
destructor: device_deallocate(device_t)
+#else /* KERNEL_SERVER */
+#ifdef DEVICE_INTRAN
+ intran: DEVICE_INTRAN
+#endif
+#ifdef DEVICE_OUTTRAN
+ outtran: DEVICE_OUTTRAN
+#endif
+#ifdef DEVICE_DESTRUCTOR
+ destructor: DEVICE_DESTRUCTOR
+#endif
#endif /* KERNEL_SERVER */
;