Changeset b468898 in rtems


Ignore:
Timestamp:
Feb 6, 2006, 9:43:58 PM (14 years ago)
Author:
Eric Norum <WENorum@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
8b1b107
Parents:
4fca5bd5
Message:

Avoid possible division by zero.

Location:
c/src/lib/libbsp/m68k/uC5282
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/uC5282/ChangeLog

    r4fca5bd5 rb468898  
     12006-02-06  Eric Norum <norume@aps.anl.gov>
     2
     3    * clock/clock.c: Avoid division by zero.
     4
    152006-01-29  Eric Norum <norume@aps.anl.gov>
    26
  • c/src/lib/libbsp/m68k/uC5282/clock/clock.c

    r4fca5bd5 rb468898  
    109109int rtems_bsp_cpu_load_percentage(void)
    110110{
    111     return 100 - ((100 * (FILTERED_IDLE >> FILTER_SHIFT)) / MAX_IDLE_COUNT);
     111    return MAX_IDLE_COUNT ?
     112           (100 - ((100 * (FILTERED_IDLE >> FILTER_SHIFT)) / MAX_IDLE_COUNT)) :
     113           0;
    112114}
    113115
  • c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c

    r4fca5bd5 rb468898  
    224224  {
    225225  extern void _BSP_Thread_Idle_body(void);
    226   _CPU_Table.idle_task = _BSP_Thread_Idle_body;
     226  Cpu_table.idle_task = _BSP_Thread_Idle_body;
    227227  }
    228228  Cpu_table.interrupt_vector_table = (m68k_isr *)0; /* vectors at start of RAM */
Note: See TracChangeset for help on using the changeset viewer.