Thomas Witzel wrote:
> I have that now, but I'm not really sure how to synchronize the user space 
> application with the driver, since the driver has of course only a limited 
> buffer. Practically now I have a 512 sample buffer in the driver that I use 
> as a double buffer and I copy blocks of 256 to the user on read. 
> Isn't there a way to have a FIFO between driver and user application and is 
> there an example somewhere, where I can see how this is done properly ?

Why not extending your sample buffer to some FIFO by providing more space?

> 
> Independently of that, if the user space application dies, how can I remove 
> the driver then ?

As long as we have no auto-cleanup on termination (WIP), you can
forcibly close a RTDM file descriptor via "echo FD >
/proc/xenomai/rtdm/open_fildes" (FD = descriptor number, see "cat
/proc/xenomai/rtdm/open_fildes" for candidates). Once all descriptors of
a device are closed, you can remove the driver again.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to