All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: zakaria ElQotbi <zakaria.elqotbi@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] rtdm mmap entry point
Date: Wed, 23 Apr 2008 22:33:26 +0200	[thread overview]
Message-ID: <18447.40214.569540.276791@domain.hid> (raw)
In-Reply-To: <480F5BA9.5010003@domain.hid>

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.


      reply	other threads:[~2008-04-23 20:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-23 15:54 [Xenomai-help] rtdm mmap entry point zakaria ElQotbi
2008-04-23 20:33 ` Gilles Chanteperdrix [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18447.40214.569540.276791@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=xenomai@xenomai.org \
    --cc=zakaria.elqotbi@domain.hid \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.