Changeset be06914 in mainline for uspace/app/top/top.h


Ignore:
Timestamp:
2010-06-11T12:41:35Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b3b7e14
Parents:
48dcc69
Message:

nicer top printouts
fix typos (recieved → received)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/top/top.h

    r48dcc69 rbe06914  
    3939#include <time.h>
    4040
    41 #define FRACTION_TO_FLOAT(float, a, b) { \
    42         (float).upper = (a); \
    43         (float).lower = (b); \
    44 }
     41#define FRACTION_TO_FLOAT(float, a, b) \
     42        { \
     43                if ((b) != 0) { \
     44                        (float).upper = (a); \
     45                        (float).lower = (b); \
     46                } else { \
     47                        (float).upper = 0; \
     48                        (float).lower = 1; \
     49                } \
     50        }
    4551
    4652#define OP_TASKS  1
     
    6167
    6268typedef struct {
     69        fixed_float virtmem;
    6370        fixed_float ucycles;
    6471        fixed_float kcycles;
    65         fixed_float virtmem;
    6672} perc_task_t;
     73
     74typedef struct {
     75        fixed_float cycles;
     76        fixed_float count;
     77} perc_exc_t;
    6778
    6879typedef struct {
     
    92103        size_t exceptions_count;
    93104        stats_exc_t *exceptions;
     105        perc_exc_t *exceptions_perc;
    94106       
    95107        stats_physmem_t *physmem;
Note: See TracChangeset for help on using the changeset viewer.