Changeset 1ab8539 in mainline for kernel/generic/src/sysinfo/stats.c


Ignore:
Timestamp:
2014-11-14T19:16:23Z (9 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5042706
Parents:
9696b01
Message:

remove system.uptime sysinfo entry since it is redundant
cleanup the time handling routines

  • still more cleanup is needed here, the code is a wild combination of quasi-POSIX API (with all the brain-dead types, etc.) and HelenOS API
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/sysinfo/stats.c

    r9696b01 r1ab8539  
    8080static mutex_t load_lock;
    8181
    82 /** Get system uptime
    83  *
    84  * @param item Sysinfo item (unused).
    85  * @param data Unused.
    86  *
    87  * @return System uptime (in secords).
    88  *
    89  */
    90 static sysarg_t get_stats_uptime(struct sysinfo_item *item, void *data)
    91 {
    92         /* This doesn't have to be very accurate */
    93         return uptime->seconds1;
    94 }
    95 
    9682/** Get statistics of all CPUs
    9783 *
     
    818804        mutex_initialize(&load_lock, MUTEX_PASSIVE);
    819805       
    820         sysinfo_set_item_gen_val("system.uptime", NULL, get_stats_uptime, NULL);
    821806        sysinfo_set_item_gen_data("system.cpus", NULL, get_stats_cpus, NULL);
    822807        sysinfo_set_item_gen_data("system.physmem", NULL, get_stats_physmem, NULL);
Note: See TracChangeset for help on using the changeset viewer.