Changeset 2256946 in rtems for cpukit/rtems/src/clockset.c


Ignore:
Timestamp:
Oct 6, 2017, 1:30:47 PM (23 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
65012bf
Parents:
c0623a99
git-author:
Sebastian Huber <sebastian.huber@…> (10/06/17 13:30:47)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/09/17 06:30:03)
Message:

score: Use struct timespec for TOD

Use the timestamps only for uptime based values. Use struct timespec
for the absolute time values (TOD).

Update #2740.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/src/clockset.c

    rc0623a99 r2256946  
    3131
    3232  if ( _TOD_Validate( tod ) ) {
    33     Timestamp_Control tod_as_timestamp;
    34     uint32_t          seconds;
    35     uint32_t          nanoseconds;
    36     ISR_lock_Context  lock_context;
     33    struct timespec  tod_as_timespec;
     34    ISR_lock_Context lock_context;
    3735
    38     seconds = _TOD_To_seconds( tod );
    39     nanoseconds = tod->ticks
     36    tod_as_timespec.tv_sec = _TOD_To_seconds( tod );
     37    tod_as_timespec.tv_nsec = tod->ticks
    4038      * rtems_configuration_get_nanoseconds_per_tick();
    41     _Timestamp_Set( &tod_as_timestamp, seconds, nanoseconds );
    4239
    4340    _TOD_Lock();
    4441    _TOD_Acquire( &lock_context );
    45     _TOD_Set( &tod_as_timestamp, &lock_context );
     42    _TOD_Set( &tod_as_timespec, &lock_context );
    4643    _TOD_Unlock();
    4744
Note: See TracChangeset for help on using the changeset viewer.