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

    rc0623a99 r2256946  
    3737
    3838  if ( clock_id == CLOCK_REALTIME ) {
     39    ISR_lock_Context lock_context;
     40
    3941    if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
    4042      rtems_set_errno_and_return_minus_one( EINVAL );
    4143
    42     _TOD_Set_with_timespec( tp );
     44    _TOD_Lock();
     45    _TOD_Acquire( &lock_context );
     46    _TOD_Set( tp, &lock_context );
     47    _TOD_Unlock();
    4348  }
    4449#ifdef _POSIX_CPUTIME
Note: See TracChangeset for help on using the changeset viewer.