Changeset 3888771 in rtems


Ignore:
Timestamp:
Apr 27, 2016, 7:32:23 PM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
1ef8e4a8
Parents:
7772640
git-author:
Sebastian Huber <sebastian.huber@…> (04/27/16 19:32:23)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/02/16 05:46:16)
Message:

score: Streamline set time of day functions

Rename _TOD_Set() into _TOD_Set_with_timespec(). Rename
_TOD_Set_with_timestamp() into _TOD_Set(). This is now in line with
_TOD_Get() and _TOD_Get_as_timespec(). The timestamp is the canonical
format.

Location:
cpukit
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/src/clocksettime.c

    r7772640 r3888771  
    4343
    4444    _Thread_Disable_dispatch();
    45       _TOD_Set( tp );
     45      _TOD_Set_with_timespec( tp );
    4646    _Thread_Enable_dispatch();
    4747  }
  • cpukit/rtems/src/clockset.c

    r7772640 r3888771  
    4040
    4141    _Thread_Disable_dispatch();
    42       _TOD_Set_with_timestamp( &tod_as_timestamp );
     42      _TOD_Set( &tod_as_timestamp );
    4343    _Thread_Enable_dispatch();
    4444
  • cpukit/score/include/rtems/score/todimpl.h

    r7772640 r3888771  
    144144
    145145/**
    146  *  @brief Sets the time of day from timestamp.
    147  *
    148  *  The @a tod_as_timestamp timestamp represents the time since UNIX epoch.
    149  *  The watchdog seconds chain will be adjusted.
    150  *
    151  *  @param[in] tod_as_timestamp is the constant of the time of day as a timestamp
    152  */
    153 void _TOD_Set_with_timestamp(
     146 * @brief Sets the time of day.
     147 *
     148 * @param tod_as_timestamp The new time of day in timestamp format representing
     149 *   the time since UNIX Epoch.
     150 */
     151void _TOD_Set(
    154152  const Timestamp_Control *tod_as_timestamp
    155153);
    156154
    157155/**
    158  *  @brief Sets the time of day from timespec.
    159  *
    160  *  The @a tod_as_timestamp timestamp represents the time since UNIX epoch.
    161  *  The watchdog seconds chain will be adjusted.
    162  *
    163  *  In the process the input given as timespec will be transformed to FreeBSD
    164  *  bintime format to guarantee the right format for later setting it with a
    165  *  timestamp.
    166  *
    167  *  @param[in] tod_as_timespec is the constant of the time of day as a timespec
    168  */
    169 static inline void _TOD_Set(
     156 * @brief Sets the time of day with timespec format.
     157 *
     158 * @param tod_as_timespec The new time of day in timespec format.
     159 *
     160 * @see _TOD_Set().
     161 */
     162static inline void _TOD_Set_with_timespec(
    170163  const struct timespec *tod_as_timespec
    171164)
     
    178171    tod_as_timespec->tv_nsec
    179172  );
    180   _TOD_Set_with_timestamp( &tod_as_timestamp );
     173  _TOD_Set( &tod_as_timestamp );
    181174}
    182175
  • cpukit/score/src/coretodadjust.c

    r7772640 r3888771  
    4545    _Timestamp_Add_to( &tod, &delta );
    4646
    47     _TOD_Set_with_timestamp( &tod );
     47    _TOD_Set( &tod );
    4848
    4949  _Thread_Enable_dispatch();
  • cpukit/score/src/coretodset.c

    r7772640 r3888771  
    2323#include <rtems/score/watchdogimpl.h>
    2424
    25 void _TOD_Set_with_timestamp(
     25void _TOD_Set(
    2626  const Timestamp_Control *tod_as_timestamp
    2727)
Note: See TracChangeset for help on using the changeset viewer.