Changeset aab5e46 in mainline for kernel/generic/src/sysinfo/stats.c
- Timestamp:
- 2018-11-03T23:32:39Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 790f3a3
- Parents:
- ef1eab7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/sysinfo/stats.c
ref1eab7 raab5e46 246 246 247 247 /* Count the tasks */ 248 size_t count = odict_count(&tasks);248 size_t count = task_count(); 249 249 250 250 if (count == 0) { … … 271 271 /* Gather the statistics for each task */ 272 272 size_t i = 0; 273 odlink_t *odlink = odict_first(&tasks); 274 while (odlink != NULL) { 275 task_t *task = odict_get_instance(odlink, task_t, ltasks); 276 273 task_t *task = task_first(); 274 while (task != NULL) { 277 275 /* Interrupts are already disabled */ 278 276 irq_spinlock_lock(&(task->lock), false); … … 283 281 284 282 irq_spinlock_unlock(&(task->lock), false); 285 odlink = odict_next(odlink, &tasks);283 task = task_next(task); 286 284 } 287 285 … … 336 334 337 335 /* Count the threads */ 338 size_t count = odict_count(&threads);336 size_t count = thread_count(); 339 337 340 338 if (count == 0) { … … 362 360 size_t i = 0; 363 361 364 odlink_t *odlink = odict_first(&threads); 365 while (odlink != NULL) { 366 thread_t *thread = odict_get_instance(odlink, thread_t, 367 lthreads); 368 362 thread_t *thread = thread_first(); 363 while (thread != NULL) { 369 364 /* Interrupts are already disabled */ 370 365 irq_spinlock_lock(&thread->lock, false); … … 376 371 irq_spinlock_unlock(&thread->lock, false); 377 372 378 odlink = odict_next(odlink, &threads);373 thread = thread_next(thread); 379 374 } 380 375
Note:
See TracChangeset
for help on using the changeset viewer.