On 08/04/16 09:06, Chris Johns wrote:
On 8/04/2016 4:49 PM, Sebastian Huber wrote:
This avoids the calculation of this value at run-time, similar to
rtems_configuration_get_nanoseconds_per_tick().

Delete TOD_TICKS_PER_SECOND and replace it with
rtems_configuration_get_ticks_per_second().
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -3413,6 +3413,7 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
      CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS,  /*   enabled */
CONFIGURE_MICROSECONDS_PER_TICK, /* microseconds per clock tick */ 1000 * CONFIGURE_MICROSECONDS_PER_TICK, /* nanoseconds per clock tick */
+    1000000 / CONFIGURE_MICROSECONDS_PER_TICK,/* ticks per second */
CONFIGURE_TICKS_PER_TIMESLICE, /* ticks per timeslice quantum */
      CONFIGURE_IDLE_TASK_BODY,                 /* user's IDLE task */
CONFIGURE_IDLE_TASK_STACK_SIZE, /* IDLE task stack size */

I assume the microsecond, nanosecond and tick per sec values all need to agree.

Does anything check this is the case and raise a fatal error if they do not?

Currently nobody checks this. Should we check this via an _Assert()? If we add new fatal errors, it will get difficult. We need to test it. The Configuration is read-only. We would have to avoid <rtems/confdefs.h> to create a corrupt Configuration and this is very bad.

--
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.hu...@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to