All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] rtdm mmap entry point
@ 2008-04-23 15:54 zakaria ElQotbi
  2008-04-23 20:33 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 2+ messages in thread
From: zakaria ElQotbi @ 2008-04-23 15:54 UTC (permalink / raw)
  To: xenomai

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 <cid:part1.07040204.02010302@domain.hid> = {
     .owner   =  THIS_MODULE,
     .mmap    =  ipci_mmap <cid:part2.04040306.03010502@domain.hid>,
     .read    =  ipci_read <cid:part3.03040709.02050608@domain.hid>,
     .write   =  ipci_write <cid:part4.05050209.09030202@domain.hid>,
     .open    =  ipci_open <cid:part5.03080906.01020608@domain.hid>,
     .release =  ipci_release <cid:part6.07030805.04090101@domain.hid>,
};

Thanks



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Xenomai-help] rtdm mmap entry point
  2008-04-23 15:54 [Xenomai-help] rtdm mmap entry point zakaria ElQotbi
@ 2008-04-23 20:33 ` Gilles Chanteperdrix
  0 siblings, 0 replies; 2+ messages in thread
From: Gilles Chanteperdrix @ 2008-04-23 20:33 UTC (permalink / raw)
  To: zakaria ElQotbi; +Cc: xenomai

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 <cid:part1.07040204.02010302@domain.hid> = {
 >      .owner   =  THIS_MODULE,
 >      .mmap    =  ipci_mmap <cid:part2.04040306.03010502@domain.hid>,
 >      .read    =  ipci_read <cid:part3.03040709.02050608@domain.hid>,
 >      .write   =  ipci_write <cid:part4.05050209.09030202@domain.hid>,
 >      .open    =  ipci_open <cid:part5.03080906.01020608@domain.hid>,
 >      .release =  ipci_release <cid:part6.07030805.04090101@domain.hid>,
 > };

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-23 20:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-23 15:54 [Xenomai-help] rtdm mmap entry point zakaria ElQotbi
2008-04-23 20:33 ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.