RTDM read/write callback with parameters
haag at aim-online.com
Wed Sep 23 10:00:54 CEST 2020
Am 22.09.2020 um 17:18 schrieb Jan Kiszka:
> On 21.09.20 15:49, Martin Haag via Xenomai wrote:
>> Dear list members,
>> I am porting a Linux PCI character device driver to Xenomai 2.6.5.
>> I can not find a RTDM expression for the "parameters" argument of the
>> struct file_operations read callback.
>> struct file_operations:
>> ssize_t aim_read(struct file* file, char __user *parameters, size_t
>> parameterSize, loff_t* offset);
>> struct rtdm_operations:
>> ssize_t aim_rtdm_read(struct rtdm_dev_context *context, rtdm_user_info_t
>> *user_info, void *buf, size_t nbyte)
> buf would map to parameter in the kernel interface, and there is no
> equivalent of offset.
Thanks for the confirmation. This is what I found out when I tried to
use "buf" as input yesterday. I guess what confused me was the "buf"
parameter being documented as "[out]" for the read callback.
> typedef ssize_t(* rtdm_read_handler_t)(struct rtdm_dev_context
> *context, rtdm_user_info_t *user_info, void *buf, size_t nbyte)
> Read handler.
> [in] context Context structure associated with opened device
> [in] user_info Opaque pointer to information about user mode
> caller, NULL if kernel mode call
> [out] buf Input buffer as passed by the user
> [in] nbyte Number of bytes the user requests to read
AIM - Gesellschaft für angewandte Informatik und Mikroelektronik m.b.H
Registered Office: Freiburg
District Court of Freiburg HRB 3520
Managing Directors: Hansjörg Frey, Joachim Schuler
This E-mail and any attachment(s) to it are for the addressee's use only.
It is strictly confidential and may contain legally privileged information.
No confidentiality or privilege is waived or lost by any mistransmission.
If you are not the intended addressee, then please delete it from your system and notify the sender immediately.
You are hereby notified that any use, disclosure, copying or any action taken in reliance on it is strictly prohibited and may be unlawful.
- Thank you.
More information about the Xenomai