Must I implement the vm_operations while rtdm_mmap_to_user function is to be called?

Jan Kiszka jan.kiszka at siemens.com
Thu Apr 23 07:39:57 CEST 2020


On 23.04.20 05:55, 孙世龙 via Xenomai wrote:
> Hi,
>        Must I implement the vm_operations while
> rtdm_mmap_to_user function is to be called?
>        Vm_operations is to be executed on the vm_area
> of the user memory range, as per the documentation,
> https://xenomai.org/documentation/xenomai-3/html/xeno3prm/group__rtdm__util.html#ga819ed9b5bbfd95e4f833c7f70732cebd
> .
>       I wonder when the vm_operations is to be called
> and what function it supplys.When should I
> implement the vm_operations.

  * @param[in] vm_ops vm_operations to be executed on the vm_area of the
  * user memory range or NULL
                      ^^^^^^^

If you have nothing to do on map/unmap, there is no need for the ops. 
See e.g. kernel/drivers/analogy/buffer.c for as simple of work to be done.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux



More information about the Xenomai mailing list