Changes in uspace/lib/c/generic/stats.c [8eec3c8:dec16a2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/stats.c
r8eec3c8 rdec16a2 184 184 } 185 185 186 /** Get exception statistics.187 *188 * @param count Number of records returned.189 *190 * @return Array of stats_exc_t structures.191 * If non-NULL then it should be eventually freed192 * by free().193 *194 */195 stats_exc_t *stats_get_exceptions(size_t *count)196 {197 size_t size = 0;198 stats_exc_t *stats_exceptions =199 (stats_exc_t *) sysinfo_get_data("system.exceptions", &size);200 201 assert((size % sizeof(stats_exc_t)) == 0);202 203 *count = size / sizeof(stats_exc_t);204 return stats_exceptions;205 }206 207 /** Get single exception statistics208 *209 * @param excn Exception number we are interested in.210 *211 * @return Pointer to the stats_exc_t structure.212 * If non-NULL then it should be eventually freed213 * by free().214 *215 */216 stats_exc_t *stats_get_exception(unsigned int excn)217 {218 char name[SYSINFO_STATS_MAX_PATH];219 snprintf(name, SYSINFO_STATS_MAX_PATH, "system.exceptionss.%u", excn);220 221 size_t size = 0;222 stats_exc_t *stats_exception =223 (stats_exc_t *) sysinfo_get_data(name, &size);224 225 assert((size == sizeof(stats_exc_t)) || (size == 0));226 227 return stats_exception;228 }229 230 186 /** Get system load 231 187 *
Note:
See TracChangeset
for help on using the changeset viewer.