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


Ignore:
Timestamp:
2010-05-21T07:50:04Z (16 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d51ee2b
Parents:
cf8cc36 (diff), 15b592b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge mainline changes (rev. 451)

File:
1 moved

Legend:

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

    rcf8cc36 rc47e1a8  
    11/*
    2  * Copyright (c) 2005 Martin Decky
     2 * Copyright (c) 2010 Stanislav Kozina
     3 * Copyright (c) 2010 Martin Decky
    34 * All rights reserved.
    45 *
     
    2728 */
    2829
    29 #ifndef BOOT_sparc64_MAIN_H_
    30 #define BOOT_sparc64_MAIN_H_
     30/** @addtogroup top
     31 * @{
     32 */
    3133
    32 #include <ofw.h>
    33 #include <ofw_tree.h>
    34 #include <balloc.h>
    35 #include <types.h>
     34#ifndef TOP_TOP_H_
     35#define TOP_TOP_H_
    3636
    37 #define KERNEL_VIRTUAL_ADDRESS  0x400000
     37#include <task.h>
     38#include <stats.h>
     39#include <time.h>
    3840
    39 #define TASKMAP_MAX_RECORDS  32
     41#define FRACTION_TO_FLOAT(float, a, b) { \
     42        (float).upper = (a); \
     43        (float).lower = (b); \
     44}
    4045
    41 /** Size of buffer for storing task name in task_t. */
    42 #define BOOTINFO_TASK_NAME_BUFLEN  32
     46#define OP_TASKS  1
     47#define OP_IPC    2
    4348
    44 #define BSP_PROCESSOR  1
    45 #define AP_PROCESSOR   0
    46 
    47 #define SUBARCH_US   1
    48 #define SUBARCH_US3  3
     49extern int operation_type;
    4950
    5051typedef struct {
    51         void *addr;
    52         uint32_t size;
    53         char name[BOOTINFO_TASK_NAME_BUFLEN];
    54 } task_t;
     52        uint64_t upper;
     53        uint64_t lower;
     54} fixed_float;
    5555
    5656typedef struct {
    57         uint32_t count;
    58         task_t tasks[TASKMAP_MAX_RECORDS];
    59 } taskmap_t;
     57        fixed_float idle;
     58        fixed_float busy;
     59} perc_cpu_t;
    6060
    6161typedef struct {
    62         uintptr_t physmem_start;
    63         taskmap_t taskmap;
    64         memmap_t memmap;
    65         ballocs_t ballocs;
    66         ofw_tree_node_t *ofw_root;
    67 } bootinfo_t;
     62        fixed_float ucycles;
     63        fixed_float kcycles;
     64        fixed_float virtmem;
     65} perc_task_t;
    6866
    69 extern uint32_t silo_ramdisk_image;
    70 extern uint32_t silo_ramdisk_size;
    71 
    72 extern void start(void);
    73 extern void bootstrap(void);
     67typedef struct {
     68        time_t hours;
     69        time_t minutes;
     70        time_t seconds;
     71       
     72        sysarg_t udays;
     73        sysarg_t uhours;
     74        sysarg_t uminutes;
     75        sysarg_t useconds;
     76       
     77        size_t load_count;
     78        load_t *load;
     79       
     80        size_t cpus_count;
     81        stats_cpu_t *cpus;
     82        perc_cpu_t *cpus_perc;
     83       
     84        size_t tasks_count;
     85        stats_task_t *tasks;
     86        perc_task_t *tasks_perc;
     87       
     88        size_t threads_count;
     89        stats_thread_t *threads;
     90       
     91        stats_physmem_t *physmem;
     92} data_t;
    7493
    7594#endif
     95
     96/**
     97 * @}
     98 */
Note: See TracChangeset for help on using the changeset viewer.