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

Function task_first

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

Get first task (task with lowest ID). * * @return Pointer to first task or @c NULL if there are none. */

Source from the content-addressed store, hash-verified

452 * @return Pointer to first task or @c NULL if there are none.
453 */
454task_t *task_first(void)
455{
456 odlink_t *odlink;
457
458 assert(interrupts_disabled());
459 assert(irq_spinlock_locked(&tasks_lock));
460
461 odlink = odict_first(&tasks);
462 if (odlink == NULL)
463 return NULL;
464
465 return odict_get_instance(odlink, task_t, ltasks);
466}
467
468/** Get next task (with higher task ID).
469 *

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_firstFunction · 0.50

Tested by

no test coverage detected