From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <516D93AC.1040703@xenomai.org> Date: Tue, 16 Apr 2013 20:08:44 +0200 From: Gilles Chanteperdrix MIME-Version: 1.0 References: <5165E85B.2040609@xenomai.org> <51660709.3010809@xenomai.org> <6C6B8C75-5498-4645-AA10-5651431A1E90@mah.priv.at> <516660A2.3020307@xenomai.org> <913FB5D5-4051-40BC-A81D-5832DDD4D69D@mah.priv.at> <51670ED3.2070009@xenomai.org> <08EA9EC3-6EBE-4527-AE0C-D44F9FB8A9E1@mah.priv.at> In-Reply-To: <08EA9EC3-6EBE-4527-AE0C-D44F9FB8A9E1@mah.priv.at> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] shared memory compatibility - advice sought List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Haberler Cc: xenomai@xenomai.org On 04/16/2013 02:59 PM, Michael Haberler wrote: > > I've gotten the char shm driver to work flawlessly as suggested, and > am now looking into dumping the rest of the SysV IPC legacy code in > the linuxcnc code base and replace it by shm_open/mmap > > reading up on the Xenomai Posix skin a bit late (ahem) it occurs to > me the best solution would have been to use the Xenomai Posix skin > throughout, kernel and userland, dump my little driver, and be done > with it > > the catch, of course, is that the Xenomai Posix skin is available on, > well, Xenomai only, which leaves out the RTAI and vanilla kernels > cases, and any other flavor downstream > > reading up on ksrc/skins/posix/shm.c it occurs to me it isnt exactly > a copy & paste job getting that to run without the Xenomai > environment The reason is that the posix shm interface is not exactly simple. By defining your own API, you can do something much simpler. You them implement the API directly in kernel-space with return memory, and in user-space by using the ioctls provided by the driver. -- Gilles.