From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <4875254d-fa4b-9160-aecf-9f9dc624d708@univ-grenoble-alpes.fr> References: <57898ff1-afda-849d-dbd6-be3a480d44a8@univ-grenoble-alpes.fr> <4875254d-fa4b-9160-aecf-9f9dc624d708@univ-grenoble-alpes.fr> From: Greg Gallagher Date: Wed, 18 Apr 2018 09:48:07 -0400 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [Xenomai] Questions about IRQ List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jean-Marc Lenoir Cc: "Xenomai@xenomai.org" Take a look at this header file, it will eventually be documented properly. https://git.xenomai.org/xenomai-3.git/tree/include/cobalt/kernel/rtdm/udd.h= ?id=3D33dd9ce1b5765e3f9da6de21ea647ea3cd454ba9 I keep meaning to do an example, hopefully I'll make some time sooner than later. -Greg On Wed, Apr 18, 2018 at 5:16 AM, Jean-Marc Lenoir wrote: > Thanks for the explanations! It's clear for me now. > UDD seems to be exactly what I would like, so if you find some examples > please tell me. > > Jean-Marc > > > Le 17/04/2018 =C3=A0 18:38, Greg Gallagher a =C3=A9crit : >> >> This API is the API for the cobalt kernel and used in kernel >> space. These functions aren't available in user space. Your user >> program is failing to build because the data structures exist in the >> kernel and not in user space. >> You can create an RTDM driver to handle the IRQs from the PCI >> board and then a user space program to read data from the driver. >> Usually you can't have the Linux driver and the xenomai driver loaded >> at the same time, for drivers like RTnet, serial and SPI I have to >> unload the Linux driver or else the Xenomai probe function won't be >> called because the Linux driver has registered itself for the >> hardware. I guess there could be exceptions to that rule. >> If you want examples for RTDM drivers look in the drivers >> directory. You can also look at using UDD driver to control the >> device from user space. When I get time I'll look through the code >> base and see if I can point you to some examples. In the meantime the >> UDD source files contain some documentation about how the functions >> work if you want to get some more information. >> >> -Greg >> >> On Tue, Apr 17, 2018 at 10:59 AM, Jean-Marc Lenoir >> wrote: >>> >>> Hello, >>> >>> I would like to make a program which handle the interrupt requests of a >>> PCI >>> board with Xenomai 3. I'm trying to use this Xenomai API: >>> >>> https://xenomai.org/documentation/xenomai-3/html/xeno3prm/group__cobalt= __core__irq.html >>> but there are some points that are not clear at all for me. >>> >>> 1) There is already a Linux driver that handle the IRQ of this board an= d >>> I >>> need to keep this driver running because I use it for the board >>> configuration. So, if both a Linux driver and a Xenomai program try to >>> handle the same IRQ, what happen? Does Xenomai always have the priority= ? >>> Or >>> do I need to configure something to give the priority to Xenomai? >>> >>> 2) This API works on kernel mode or user mode? (Actually, I'm not sure >>> there >>> is a kernel mode, I'm a beginner with Xenomai.) >>> >>> 3) When I'm trying to make a simple program with this API (in user mode= ), >>> I >>> am unable to compile it: there is some missing definitions like the >>> structure xnintr. I think I need to change something when I build the >>> Xenomai libraries but I don't know what (the current libraries are >>> compiled >>> with the options "./configure --with-core=3Dcobalt --enable-smp >>> --enable-pshared"). Any idea? >>> >>> 4) If someone know where I can find an example of program using this AP= I, >>> it >>> could help me a lot. >>> >>> Thanks for your help, >>> Jean-Marc >>> >>> >>> _______________________________________________ >>> Xenomai mailing list >>> Xenomai@xenomai.org >>> https://xenomai.org/mailman/listinfo/xenomai > >