Rodrigo Rosenfeld Rosas wrote: >> ... >> I tested it (after figuring out what to do at all, and how to get it >> working then...) with a simple demo that returns a shared kernel memory >> block, mapped into user-space via an RTDM-IOCTL. I think you should >> easily (now really!) adapt it to your needs. Please check if this >> functions meets your requirements and works for more than one scenario. >> If so, I will add it to official RTDM. >> >> >> @all: I would be curious to hear any comment on my /dev/zero-trick to >> invoke mmap in kernel-space. Is this an ugly hack or may it be worth >> considering to apply on /dev/rtheap as well - to overcome the need for >> this device (and related user errors...)? > > Jan, actually I didn't like the /dev/zero hack. If someone else is > using /dev/zero it will result in a problem... I think it would be better to
Why? It isn't an exclusive device. And I'm only invoking open/close on the original instance (which even have no handlers associated, see drivers/char/mem.c), mmap gets overloaded. > reserve a separate file descriptor for mmaping. Maybe in a separate module > like xeno_mmap that only register a, say, /dev/xenommap or /dev/xenomai/mmap. > I think it would be a better approach. Or maybe something like > > void *rtdm_mmap_to_user(void *buffer, size_t length, char *dev_to_use) > > Just some ideas... Maybe I'm overseeing something: Did you face real problems with my approach? Jan
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Xenomai-help mailing list [email protected] https://mail.gna.org/listinfo/xenomai-help
