On 04/24/2017 11:37 AM, Benjamin Alix wrote:
> Hello,
> 
> I'm maintaining RTDM modules built under Xenomai 2.6.4 and I'm unable
> to unload them which is not the case with the others non-RTDM modules.
> Whenever I do :
> 
> rmmod my_RTDM_module.ko
> 
> The function rtdm_dev_unregister() return EPERM. So I tried to
> increase the poll_delay argument (which was 0) without success. In
> fact the module doesn't unload even after the time I entered in the
> poll_delay argument and I can't do anything in the terminal.
> 
> So first, I suppose that something is using the device managed by the
> driver but I'm unable to tell what. Is there any way I can find out
> what it is ?
> 

You may want to check /proc/rtdm/open_fildes. In addition, writing a fd
number to this file forces RTDM to close the corresponding descriptor.

> Secondly is there an other way that I'm missing to unload these RTDM modules ?
> 

No, you have to close all file descriptors first, then unregister the
driver.

-- 
Philippe.

_______________________________________________
Xenomai mailing list
[email protected]
https://xenomai.org/mailman/listinfo/xenomai

Reply via email to