[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] include: fix the definition of device_open
From: |
Samuel Thibault |
Subject: |
Re: [PATCH] include: fix the definition of device_open |
Date: |
Sat, 12 Apr 2014 09:18:06 +0200 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Fri 11 Apr 2014 09:32:30 +0200, a écrit :
> 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.
Ack.
> * include/device/device.defs (device_open): Redefine the device
> argument to make it polymorphic unless a outran function is specified.
> ---
> include/device/device.defs | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> 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(
> --
> 1.9.1
>
--
Samuel
<h> t: bah c'est tendre le pattern pour se faire matcher, hein
Re: [PATCH] include: fix the definition of device_open, Samuel Thibault, 2014/04/11
Re: [PATCH] include: fix the definition of device_open,
Samuel Thibault <=