scheduler.c

Include dependency graph for scheduler.c:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "14" [label="stdbool.h" tooltip="stdbool.h"]
    "15" [label="stdatomic.h" tooltip="stdatomic.h"]
    "6" [label="atom.h" tooltip="atom.h"]
    "16" [label="synclist.h" tooltip="synclist.h"]
    "5" [label="stdint.h" tooltip="stdint.h"]
    "7" [label="stdlib.h" tooltip="stdlib.h"]
    "32" [label="valueshashtable.h" tooltip="valueshashtable.h"]
    "1" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/scheduler.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/scheduler.c" fillcolor="#BFBFBF"]
    "2" [label="scheduler.h" tooltip="scheduler.h"]
    "31" [label="exportedfunction.h" tooltip="exportedfunction.h"]
    "3" [label="context.h" tooltip="context.h"]
    "21" [label="utils.h" tooltip="utils.h"]
    "9" [label="term_typedef.h" tooltip="term_typedef.h"]
    "22" [label="stddef.h" tooltip="stddef.h"]
    "10" [label="limits.h" tooltip="limits.h"]
    "23" [label="refc_binary.h" tooltip="refc_binary.h"]
    "19" [label="string.h" tooltip="string.h"]
    "26" [label="mailbox.h" tooltip="mailbox.h"]
    "29" [label="module.h" tooltip="module.h"]
    "18" [label="term.h" tooltip="term.h"]
    "8" [label="erl_nif.h" tooltip="erl_nif.h"]
    "33" [label="time.h" tooltip="time.h"]
    "24" [label="resources.h" tooltip="resources.h"]
    "13" [label="smp.h" tooltip="smp.h"]
    "28" [label="sys.h" tooltip="sys.h"]
    "30" [label="atomshashtable.h" tooltip="atomshashtable.h"]
    "27" [label="debug.h" tooltip="debug.h"]
    "4" [label="globalcontext.h" tooltip="globalcontext.h"]
    "20" [label="memory.h" tooltip="memory.h"]
    "17" [label="stdio.h" tooltip="stdio.h"]
    "25" [label="timer_list.h" tooltip="timer_list.h"]
    "12" [label="list.h" tooltip="list.h"]
    "11" [label="inttypes.h" tooltip="inttypes.h"]
    "6" -> "5" [dir=forward tooltip="include"]
    "6" -> "7" [dir=forward tooltip="include"]
    "16" -> "12" [dir=forward tooltip="include"]
    "16" -> "17" [dir=forward tooltip="include"]
    "16" -> "13" [dir=forward tooltip="include"]
    "1" -> "2" [dir=forward tooltip="include"]
    "1" -> "17" [dir=forward tooltip="include"]
    "1" -> "27" [dir=forward tooltip="include"]
    "1" -> "12" [dir=forward tooltip="include"]
    "1" -> "13" [dir=forward tooltip="include"]
    "1" -> "28" [dir=forward tooltip="include"]
    "1" -> "21" [dir=forward tooltip="include"]
    "2" -> "3" [dir=forward tooltip="include"]
    "2" -> "4" [dir=forward tooltip="include"]
    "31" -> "18" [dir=forward tooltip="include"]
    "3" -> "4" [dir=forward tooltip="include"]
    "3" -> "12" [dir=forward tooltip="include"]
    "3" -> "26" [dir=forward tooltip="include"]
    "3" -> "13" [dir=forward tooltip="include"]
    "3" -> "18" [dir=forward tooltip="include"]
    "3" -> "25" [dir=forward tooltip="include"]
    "21" -> "22" [dir=forward tooltip="include"]
    "9" -> "10" [dir=forward tooltip="include"]
    "9" -> "11" [dir=forward tooltip="include"]
    "9" -> "5" [dir=forward tooltip="include"]
    "23" -> "14" [dir=forward tooltip="include"]
    "23" -> "7" [dir=forward tooltip="include"]
    "23" -> "12" [dir=forward tooltip="include"]
    "23" -> "24" [dir=forward tooltip="include"]
    "23" -> "13" [dir=forward tooltip="include"]
    "26" -> "14" [dir=forward tooltip="include"]
    "26" -> "12" [dir=forward tooltip="include"]
    "26" -> "13" [dir=forward tooltip="include"]
    "26" -> "9" [dir=forward tooltip="include"]
    "26" -> "21" [dir=forward tooltip="include"]
    "29" -> "14" [dir=forward tooltip="include"]
    "29" -> "5" [dir=forward tooltip="include"]
    "29" -> "6" [dir=forward tooltip="include"]
    "29" -> "30" [dir=forward tooltip="include"]
    "29" -> "3" [dir=forward tooltip="include"]
    "29" -> "31" [dir=forward tooltip="include"]
    "29" -> "4" [dir=forward tooltip="include"]
    "29" -> "18" [dir=forward tooltip="include"]
    "29" -> "32" [dir=forward tooltip="include"]
    "18" -> "14" [dir=forward tooltip="include"]
    "18" -> "5" [dir=forward tooltip="include"]
    "18" -> "17" [dir=forward tooltip="include"]
    "18" -> "7" [dir=forward tooltip="include"]
    "18" -> "19" [dir=forward tooltip="include"]
    "18" -> "20" [dir=forward tooltip="include"]
    "18" -> "23" [dir=forward tooltip="include"]
    "18" -> "21" [dir=forward tooltip="include"]
    "18" -> "9" [dir=forward tooltip="include"]
    "8" -> "9" [dir=forward tooltip="include"]
    "24" -> "7" [dir=forward tooltip="include"]
    "24" -> "8" [dir=forward tooltip="include"]
    "24" -> "12" [dir=forward tooltip="include"]
    "13" -> "14" [dir=forward tooltip="include"]
    "13" -> "15" [dir=forward tooltip="include"]
    "28" -> "4" [dir=forward tooltip="include"]
    "28" -> "29" [dir=forward tooltip="include"]
    "28" -> "5" [dir=forward tooltip="include"]
    "28" -> "33" [dir=forward tooltip="include"]
    "30" -> "6" [dir=forward tooltip="include"]
    "27" -> "3" [dir=forward tooltip="include"]
    "4" -> "5" [dir=forward tooltip="include"]
    "4" -> "6" [dir=forward tooltip="include"]
    "4" -> "8" [dir=forward tooltip="include"]
    "4" -> "12" [dir=forward tooltip="include"]
    "4" -> "13" [dir=forward tooltip="include"]
    "4" -> "16" [dir=forward tooltip="include"]
    "4" -> "18" [dir=forward tooltip="include"]
    "4" -> "25" [dir=forward tooltip="include"]
    "20" -> "8" [dir=forward tooltip="include"]
    "20" -> "9" [dir=forward tooltip="include"]
    "20" -> "21" [dir=forward tooltip="include"]
    "20" -> "5" [dir=forward tooltip="include"]
    "20" -> "7" [dir=forward tooltip="include"]
    "25" -> "14" [dir=forward tooltip="include"]
    "25" -> "5" [dir=forward tooltip="include"]
    "25" -> "12" [dir=forward tooltip="include"]
}

Defines

SMP_SPINLOCK_LOCK(spinlock)
SMP_SPINLOCK_UNLOCK(spinlock)
SMP_MUTEX_LOCK(mtx)
SMP_MUTEX_TRYLOCK(mtx)
SMP_MUTEX_UNLOCK(mtx)

Functions

static void scheduler_timeout_callback(struct TimerListItem *it)
static void scheduler_make_ready(Context *ctx)
static int update_timer_list(GlobalContext *global)
Context *scheduler_wait(Context *ctx)
static void scheduler_process_native_signal_messages(Context *ctx)
static Context *scheduler_run0(GlobalContext *global)
Context *scheduler_run(GlobalContext *global)
Context *scheduler_next(GlobalContext *global, Context *c)
void scheduler_init_ready(Context *c)
void scheduler_signal_message(Context *c)
void scheduler_terminate(Context *ctx)
void scheduler_stop_all(GlobalContext *global)
void scheduler_set_timeout(Context *ctx, avm_int64_t timeout)
void scheduler_cancel_timeout(Context *ctx)