Changeset 7210dcb4 in rtems


Ignore:
Timestamp:
Jan 27, 2003, 3:48:18 PM (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
62e080e
Parents:
635652e
Message:

2003-01-27 Juan Zamorano <jzamora@…>

  • src/ptimer1.c: Correct problem which could lead to overflow in time math.
Location:
cpukit/posix
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/ChangeLog

    r635652e r7210dcb4  
     12003-01-27      Juan Zamorano <jzamora@fi.upm.es>
     2
     3        * src/ptimer1.c: Correct problem which could lead to overflow in time
     4        math.
     5
    162003-01-03      Joel Sherrill <joel@OARcorp.com>
    27
  • cpukit/posix/src/ptimer1.c

    r635652e r7210dcb4  
    176176   rtems_time->second = seconds;
    177177
    178    rtems_time->ticks  = ( itimer->it_value.tv_nsec * SEC_TO_TICKS_C ) /
    179                         NSEC_PER_SEC_C;
     178   rtems_time->ticks  = itimer->it_value.tv_nsec/
     179                        (NSEC_PER_SEC_C / SEC_TO_TICKS_C);
    180180
    181181}
     
    574574        timer_struct[timer_pos].ticks =
    575575             ( SEC_TO_TICKS_C * value->it_value.tv_sec ) +
    576              ( value->it_value.tv_nsec /
    577                  (1000L * (unsigned32)(1000 * 10) ));
     576             ( value->it_value.tv_nsec / (NSEC_PER_SEC_C / SEC_TO_TICKS_C));
    578577
    579578        return_v = rtems_timer_fire_after ( timerid,
Note: See TracChangeset for help on using the changeset viewer.