Changeset 1a561f8 in rtems


Ignore:
Timestamp:
Sep 29, 2005, 2:20:21 PM (15 years ago)
Author:
Eric Norum <WENorum@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
a93a239
Parents:
2f22923
Message:

Remove floating point calculations and the C preprocessor conditions which enabled them.

Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r2f22923 r1a561f8  
     12005-09-29      Eric Norum <norume@aps.anl.gov>
     2
     3    * libmisc/cpuuse/cpuuse.c: Remove floating point calculations and the
     4                               C preprocessor conditions which enabled them.
     5
    162005-09-25      Joel Sherrill <joel@OARcorp.com>
    27
  • cpukit/libmisc/cpuuse/cpuuse.c

    r2f22923 r1a561f8  
    99 *  http://www.rtems.com/license/LICENSE.
    1010 *
    11  *  $Id$
     11 *  cpuuse.c,v 1.20 2004/04/17 08:12:01 ralf Exp
    1212 *
    1313 */
     
    4343  char                *cname;
    4444  char                 name[5];
     45  uint32_t             ival, fval;
    4546  uint32_t             total_units = 0;
    4647
     
    6263
    6364  fprintf(stdout,"CPU Usage by thread\n");
    64 #if defined(unix) || ( CPU_HARDWARE_FP == TRUE )
    6565  fprintf(stdout, "   ID        NAME        TICKS    PERCENT\n" );
    66 #else
    67   fprintf(stdout, "   ID        NAME        TICKS\n" );
    68 #endif
    6966
    7067  for ( api_index = 1 ;
     
    10299        if ( !isprint(name[3]) ) name[3] = '*';
    103100
    104 #if defined(unix) || ( CPU_HARDWARE_FP == TRUE )
    105         fprintf(stdout, "0x%08x   %4s    %8d     %5.3f\n",
     101        ival = total_units ? the_thread->ticks_executed * 10000 / total_units : 0;
     102                fval = ival % 100;
     103                ival /= 100;
     104                fprintf(stdout, "0x%08x   %4s    %8d     %3d.%2.2d\n",
    106105          the_thread->Object.id,
    107106          name,
    108107          the_thread->ticks_executed,
    109           (total_units) ?
    110             (double)the_thread->ticks_executed / (double)total_units :
    111             (double)total_units
     108                  ival,
     109                  fval
    112110        );
    113 #else
    114         fprintf(stdout, "0x%08x   %4s   %8d\n",
    115           the_thread->Object.id,
    116           name,
    117           the_thread->ticks_executed
    118         );
    119 #endif
    120111      }
    121112    }
Note: See TracChangeset for help on using the changeset viewer.