[PATCH 1/2] rtems: Inline rtems_clock_get_ticks_since_boot()

Gedare Bloom gedare at rtems.org
Fri Aug 22 15:26:30 UTC 2014


On Fri, Aug 22, 2014 at 11:22 AM, Joel Sherrill
<joel.sherrill at oarcorp.com> wrote:
>
> On 8/22/2014 10:18 AM, Gedare Bloom wrote:
>> On Fri, Aug 22, 2014 at 11:12 AM, Sebastian Huber
>> <sebastian.huber at embedded-brains.de> wrote:
>>> Update documentation.
>>> ---
>>>  cpukit/rtems/Makefile.am                        |  1 -
>>>  cpukit/rtems/include/rtems/rtems/clock.h        | 14 +++++------
>>>  cpukit/rtems/src/clockgettickssinceboot.c       | 31 -------------------------
>>>  cpukit/score/include/rtems/score/watchdog.h     |  7 ++++++
>>>  cpukit/score/include/rtems/score/watchdogimpl.h |  8 -------
>>>  doc/user/clock.t                                | 31 ++++++++-----------------
>>>  6 files changed, 24 insertions(+), 68 deletions(-)
>>>  delete mode 100644 cpukit/rtems/src/clockgettickssinceboot.c
>>>
>>> diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am
>>> index b00e251..a1fafb1 100644
>>> --- a/cpukit/rtems/Makefile.am
>>> +++ b/cpukit/rtems/Makefile.am
>>> @@ -151,7 +151,6 @@ librtems_a_SOURCES += src/barrierdata.c
>>>  librtems_a_SOURCES += src/clockget.c
>>>  librtems_a_SOURCES += src/clockgetsecondssinceepoch.c
>>>  librtems_a_SOURCES += src/clockgettickspersecond.c
>>> -librtems_a_SOURCES += src/clockgettickssinceboot.c
>>>  librtems_a_SOURCES += src/clockgettod.c
>>>  librtems_a_SOURCES += src/clockgettodtimeval.c
>>>  librtems_a_SOURCES += src/clockgetuptime.c
>>> diff --git a/cpukit/rtems/include/rtems/rtems/clock.h b/cpukit/rtems/include/rtems/rtems/clock.h
>>> index d80218d..ff71665 100644
>>> --- a/cpukit/rtems/include/rtems/rtems/clock.h
>>> +++ b/cpukit/rtems/include/rtems/rtems/clock.h
>>> @@ -149,15 +149,15 @@ rtems_status_code rtems_clock_get_seconds_since_epoch(
>>>  );
>>>
>>>  /**
>>> - * @brief Obtain Ticks Since Boot
>>> + * @brief Gets the current ticks counter value.
>>>   *
>>> - * This routine implements the rtems_clock_get_ticks_since_boot
>>> - * directive.
>>> - *
>>> - * @retval This method returns the number of ticks since boot. It cannot
>>> - *         fail since RTEMS always keeps a running count of ticks since boot.
>>> + * @return The current tick counter value.  With a 1ms clock tick, this counter
>>> + * overflows after 50 days since boot.
>>>   */
>>> -rtems_interval rtems_clock_get_ticks_since_boot(void);
>>> +RTEMS_INLINE_ROUTINE rtems_interval rtems_clock_get_ticks_since_boot(void)
>>> +{
>>> +  return _Watchdog_Ticks_since_boot;
>>> +}
>> This should go to a new file clockimpl.h for consistency.
> If it part of the public API, then it has to be in clock.h.
Ah. Oops.
-Gedare


More information about the devel mailing list