MCPcopy Create free account
hub / github.com/HelenOS/helenos / task_next

Function task_next

kernel/generic/src/proc/task.c:473–485  ·  view source on GitHub ↗

Get next task (with higher task ID). * * @param cur Current task * @return Pointer to next task or @c NULL if there are no more tasks. */

Source from the content-addressed store, hash-verified

471 * @return Pointer to next task or @c NULL if there are no more tasks.
472 */
473task_t *task_next(task_t *cur)
474{
475 odlink_t *odlink;
476
477 assert(interrupts_disabled());
478 assert(irq_spinlock_locked(&tasks_lock));
479
480 odlink = odict_next(&cur->ltasks, &tasks);
481 if (odlink == NULL)
482 return NULL;
483
484 return odict_get_instance(odlink, task_t, ltasks);
485}
486
487/** Get accounting data of given task.
488 *

Callers 4

get_stats_tasksFunction · 0.85
get_stats_ipccsFunction · 0.85
task_doneFunction · 0.85
task_print_listFunction · 0.85

Calls 3

irq_spinlock_lockedFunction · 0.85
interrupts_disabledFunction · 0.50
odict_nextFunction · 0.50

Tested by

no test coverage detected