[etherlab-dev] Xenomai RTDM

Florian Pose fp at igh-essen.com
Fri Jan 4 10:59:49 CET 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

Am 10.10.2012 16:48, schrieb Rob Stocks:
> However, although the example Xenomai application works without
> problem, I found that my own Xenomai application did not. After
> some investigation, I found that this was because I was calling the
> ecrt_master_activate function from a Xenomai real-time task in 
> primary mode (rather than from a standard Linux process as per the 
> example code). The problem is that activating the master causes the
> idle thread to be stopped via kthread_stop which cannot be run in a
> real-time context and causes the kernel to panic with "scheduling
> while atomic".

this method may definitely not be called in realtime context, since it
has to allocate memory to prepare the bus configuration (see the doc).

> The current implementation uses the same ioctl function for
> real-time and non real-time callers and does not check the mode of
> the caller in order to return -ENOSYS to get the caller to try
> again in the opposite context.

I think it is not a good solution to try again in other context,
because it is unambiguous for all methods, in which context they
should be called. Please change your application, so that methods are
called in the correct context.

> Note that if using the generic driver, you will have more kernel 
> "complaints" as there are situations where the xmit function cannot
> be called safely from a real-time context. If you add the 
> EC_IOCTL_SEND case to the above, you will not have hard real-time 
> support as the calling task will always be switching in and out of 
> secondary mode. This may not be an issue depending on the
> application but it should not be added as standard because it will
> unnecessarily break hard real-time support when using a ported
> driver (such as e1000e).

Please see the documentation section about the generic driver. It is
only usable for RT-PREEMPT systems (and standard kernels, of course).
Using any other realtime extension requires a native driver.

- -- 
Viele Grüße,
Florian Pose

- ------------------------------------------------------------------------

Dipl.-Ing. (FH) Florian Pose
florian.pose at igh-essen.com
Tel.: +49 201 / 36014-13

Ingenieurgemeinschaft IgH
Gesellschaft für Ingenieurleistungen mbH
Heinz-Bäcker-Str. 34
D-45356 Essen

Amtsgericht Essen HRB 11500
USt-Id.-Nr.: DE 174 626 722
Geschäftsführung:
- - Dr.-Ing. T. Finke,
- - Dr.-Ing. W. Hagemeister
Tel.: +49 201 / 360-14-0
http://www.igh-essen.com

GnuPG key: CCA047CC 2007-12-18 [expires: 2012-12-16]
Fingerprint: 0081 4005 FE9F 73FF 4BDA  A409 0011 4E20 CCA0 47CC

- ------------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlDmqBUACgkQABFOIMygR8wGhQCeMxKzWuKunpLZGF5QCayvIc0Y
EvcAnj35au78P6R18/CJuTmQRExNcVUw
=dtLY
-----END PGP SIGNATURE-----


More information about the etherlab-dev mailing list