Changeset df976833 in rtems


Ignore:
Timestamp:
Jul 7, 2000, 7:31:30 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
acddd7d2
Parents:
5f4d774e
Message:

Fixed problem reported by Victor V. Vengerov <Victor.Vengerov@…>
where alarm() did not correctly account for the watchdog start_time
and stop_time fields being based on ticks not seconds. This resulted
in alarm() returning a bogus number of seconds remaining.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/posix/src/alarm.c

    r5f4d774e rdf976833  
    3636    case WATCHDOG_ACTIVE:
    3737    case WATCHDOG_REMOVE_IT:
     38      /*
     39       *  The stop_time and start_time fields are snapshots of ticks since
     40       *  boot.  Since alarm() is dealing in seconds, we must account for
     41       *  this.
     42       */
     43
    3844      remaining = the_timer->initial -
    39                   (the_timer->stop_time - the_timer->start_time);
     45       ((the_timer->stop_time - the_timer->start_time) / _TOD_Ticks_per_second);
    4046      break;
    4147  }
  • cpukit/posix/src/alarm.c

    r5f4d774e rdf976833  
    3636    case WATCHDOG_ACTIVE:
    3737    case WATCHDOG_REMOVE_IT:
     38      /*
     39       *  The stop_time and start_time fields are snapshots of ticks since
     40       *  boot.  Since alarm() is dealing in seconds, we must account for
     41       *  this.
     42       */
     43
    3844      remaining = the_timer->initial -
    39                   (the_timer->stop_time - the_timer->start_time);
     45       ((the_timer->stop_time - the_timer->start_time) / _TOD_Ticks_per_second);
    4046      break;
    4147  }
Note: See TracChangeset for help on using the changeset viewer.