Dynamic Device Configuration v2
Joel.Sherrill at OARcorp.com
Wed Oct 30 11:17:43 UTC 2013
It works in the ALL static drivers case. But when used to size the array to include empty slots for dynamic registration, it doesn't actually do that.
Sebastian Huber <sebastian.huber at embedded-brains.de> wrote:
I still don't see the problem with
#define CONFIGURE_NUMBER_OF_DRIVERS \
On 2013-10-29 19:43, Joel Sherrill wrote:
> I haven't updated in a while on this. Attached is the current
> patch. In trying to make a user distinction between static drivers
> which are configured by name and the "maximum drivers" which
> was supposed to include the static and dynamic, I uncovered
> a bug in which you ended up with only 1 extra slot maximum
> no matter what.
> This attempts to:
> + make the number of dynamic drivers explicit
> + fix the bug
> + add any error checks I could think of
> Eventually we may want a different scheme but we have to
> fix what we have.
> Please help review this so I can commit it.
> -- Joel Sherrill, Ph.D. Director of Research & Development
> joel.sherrill at OARcorp.com On-Line Applications Research Ask me about RTEMS: a
> free RTOS Huntsville AL 35805 Support Available (256) 722-9985
>>From 81cb8b1a1caf9dca38e066f3cfea9efbf6810c67 Mon Sep 17 00:00:00 2001
> From: Joel Sherrill<joel.sherrill at oarcorp.com>
> Date: Mon, 9 Sep 2013 14:00:26 -0500
> Subject: [PATCH] configuration: Separate static from dynamic drivers
> Prior to this patch, when the user dynamically registered device
> drivers, they had to account for the number of statically installed
> drivers and add their dynamic ones on top of that.
> With this patch, the number of static drivers is calculated and not
> modifiable by the user. They configure the number of dynamically
> registered ones.
> Adds: CONFIGURE_MAXIMUM_DYNAMIC_DRIVERS
> Obsoletes: CONFIGURE_MAXIMUM_DRIVERS
> The user will get a compile time error for using CONFIGURE_MAXIMUM_DRIVERS.
I don't think we should obsolete CONFIGURE_MAXIMUM_DRIVERS and break existing
application configurations. Instead we should add an optional
CONFIGURE_MAXIMUM_DYNAMIC_DRIVERS so that
CONFIGURE_MAXIMUM_DRIVERS == RTEMS_ARRAY_SIZE(Device_drivers) +
The Device_drivers table is only used to register drivers during system start.
You can later unregister them if you like.
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
rtems-devel mailing list
rtems-devel at rtems.org
More information about the devel