MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18447.40214.569540.276791@domain.hid> Date: Wed, 23 Apr 2008 22:33:26 +0200 In-Reply-To: <480F5BA9.5010003@domain.hid> References: <480F5BA9.5010003@domain.hid> From: Gilles Chanteperdrix Subject: Re: [Xenomai-help] rtdm mmap entry point List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: zakaria ElQotbi Cc: xenomai@xenomai.org zakaria ElQotbi wrote: > Hi > > There is a way to handle mmap outside a rtdm ioctl entry point ?? > Just like : > > open_nrt: rtdm_ipci_open, > > ops:{ > close_rt: rtdm_ipci_close, > close_nrt: rtdm_ipci_close, > > ioctl_rt: NULL, > ioctl_nrt: NULL, > > read_rt: rtdm_ipci_read_rt, > read_nrt: rtdm_ipci_read_nrt, > > mmap_rt: NULL, > mmap_nrt: rtdm_ipci_read_nrt, > ...... > > i need this to port a code to rtdm. > > my std Linux code is : > > static struct file_operations ipci_fops = { > .owner = THIS_MODULE, > .mmap = ipci_mmap , > .read = ipci_read , > .write = ipci_write , > .open = ipci_open , > .release = ipci_release , > }; Well, even if mmap is implemented as an ioctl, nothing prevents you from replacing calls to mmap in the application you are making real-time by calls to the ioctl. Look, for instance at how setsockopt, bind, connect, accept, etc... are implemented, they are all implemented as ioctls under the hood. mmap has not yet such an official ioctl, but that could change. -- Gilles.