Changeset 2256946 in rtems for cpukit/score/src/coretodset.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/score/src/coretodset.c

    rc0623a99 r2256946  
    2424
    2525void _TOD_Set(
    26   const Timestamp_Control *tod_as_timestamp,
    27   ISR_lock_Context        *lock_context
     26  const struct timespec *tod,
     27  ISR_lock_Context      *lock_context
    2828)
    2929{
    30   struct timespec tod_as_timespec;
     30  struct bintime  tod_as_bintime;
    3131  uint64_t        tod_as_ticks;
    3232  uint32_t        cpu_count;
     
    3535  _Assert( _API_Mutex_Is_owner( _Once_Mutex ) );
    3636
    37   _Timecounter_Set_clock( tod_as_timestamp, lock_context );
     37  timespec2bintime( tod, &tod_as_bintime );
     38  _Timecounter_Set_clock( &tod_as_bintime, lock_context );
    3839
    39   _Timestamp_To_timespec( tod_as_timestamp, &tod_as_timespec );
    40   tod_as_ticks = _Watchdog_Ticks_from_timespec( &tod_as_timespec );
     40  tod_as_ticks = _Watchdog_Ticks_from_timespec( tod );
    4141  cpu_count = _SMP_Get_processor_count();
    4242
Note: See TracChangeset for help on using the changeset viewer.