RTDM read/write callback with parameters
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)
Should I use IOCTL to implement read/write with parameters or is there a different way to get to this information.
Please let me know if I forgot to mention important details about my setup.
Thanks,
Martin
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.
Quoted 7 lines · Martin Haag via Xenomai
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_operationsread callback.
Quoted 8 lines
struct
file_operations:ssize_taim_read(struct file* file, char __user *parameters, size_t parameterSize, loff_t* offset);struct
rtdm_operations:ssize_taim_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.
HTH,
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux
Am 22.09.2020 um 17:18 schrieb Jan Kiszka:
Quoted 17 lines · Martin Haag via Xenomai
Quoted 7 lines
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_operationsread callback.Quoted 8 lines
struct
file_operations:ssize_taim_read(struct file* file, char __user *parameters, size_t parameterSize, loff_t* offset);struct
rtdm_operations:ssize_taim_rtdm_read(struct rtdm_dev_context *context, rtdm_user_info_t *user_info, void *buf, size_t nbyte)
Quoted 6 lines
buf would map to parameter in the kernel interface, and there is no equivalent of offset.
HTH,
Jan
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.
Quoted 11 lines
typedef
ssize_t(* rtdm_read_handler_t)(structrtdm_dev_context*context,rtdm_user_info_t*user_info, void *buf,size_tnbyte) Read handler.Parameters
[in] context Context structure associated with opened device instance
[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
Best Regards,
Martin
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.