Changes in kernel/generic/src/sysinfo/stats.c [1ab8539:feeac0d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/sysinfo/stats.c
r1ab8539 rfeeac0d 80 80 static mutex_t load_lock; 81 81 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 82 96 /** Get statistics of all CPUs 83 97 * … … 804 818 mutex_initialize(&load_lock, MUTEX_PASSIVE); 805 819 820 sysinfo_set_item_gen_val("system.uptime", NULL, get_stats_uptime, NULL); 806 821 sysinfo_set_item_gen_data("system.cpus", NULL, get_stats_cpus, NULL); 807 822 sysinfo_set_item_gen_data("system.physmem", NULL, get_stats_physmem, NULL);
Note:
See TracChangeset
for help on using the changeset viewer.