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"]
    "16" [label="stdbool.h" tooltip="stdbool.h"]
    "17" [label="stdatomic.h" tooltip="stdatomic.h"]
    "6" [label="atom.h" tooltip="atom.h"]
    "11" [label="assert.h" tooltip="assert.h"]
    "18" [label="synclist.h" tooltip="synclist.h"]
    "5" [label="stdint.h" tooltip="stdint.h"]
    "7" [label="stdlib.h" tooltip="stdlib.h"]
    "34" [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"]
    "33" [label="exportedfunction.h" tooltip="exportedfunction.h"]
    "3" [label="context.h" tooltip="context.h"]
    "23" [label="utils.h" tooltip="utils.h"]
    "8" [label="atom_table.h" tooltip="atom_table.h"]
    "10" [label="term_typedef.h" tooltip="term_typedef.h"]
    "24" [label="stddef.h" tooltip="stddef.h"]
    "12" [label="limits.h" tooltip="limits.h"]
    "25" [label="refc_binary.h" tooltip="refc_binary.h"]
    "21" [label="string.h" tooltip="string.h"]
    "28" [label="mailbox.h" tooltip="mailbox.h"]
    "31" [label="module.h" tooltip="module.h"]
    "20" [label="term.h" tooltip="term.h"]
    "9" [label="erl_nif.h" tooltip="erl_nif.h"]
    "35" [label="time.h" tooltip="time.h"]
    "26" [label="resources.h" tooltip="resources.h"]
    "15" [label="smp.h" tooltip="smp.h"]
    "30" [label="sys.h" tooltip="sys.h"]
    "32" [label="atomshashtable.h" tooltip="atomshashtable.h"]
    "29" [label="debug.h" tooltip="debug.h"]
    "4" [label="globalcontext.h" tooltip="globalcontext.h"]
    "22" [label="memory.h" tooltip="memory.h"]
    "19" [label="stdio.h" tooltip="stdio.h"]
    "27" [label="timer_list.h" tooltip="timer_list.h"]
    "14" [label="list.h" tooltip="list.h"]
    "13" [label="inttypes.h" tooltip="inttypes.h"]
    "6" -> "5" [dir=forward tooltip="include"]
    "6" -> "7" [dir=forward tooltip="include"]
    "18" -> "14" [dir=forward tooltip="include"]
    "18" -> "19" [dir=forward tooltip="include"]
    "18" -> "15" [dir=forward tooltip="include"]
    "1" -> "2" [dir=forward tooltip="include"]
    "1" -> "19" [dir=forward tooltip="include"]
    "1" -> "29" [dir=forward tooltip="include"]
    "1" -> "14" [dir=forward tooltip="include"]
    "1" -> "15" [dir=forward tooltip="include"]
    "1" -> "30" [dir=forward tooltip="include"]
    "1" -> "23" [dir=forward tooltip="include"]
    "2" -> "3" [dir=forward tooltip="include"]
    "2" -> "4" [dir=forward tooltip="include"]
    "33" -> "20" [dir=forward tooltip="include"]
    "3" -> "4" [dir=forward tooltip="include"]
    "3" -> "14" [dir=forward tooltip="include"]
    "3" -> "28" [dir=forward tooltip="include"]
    "3" -> "15" [dir=forward tooltip="include"]
    "3" -> "20" [dir=forward tooltip="include"]
    "3" -> "27" [dir=forward tooltip="include"]
    "23" -> "24" [dir=forward tooltip="include"]
    "8" -> "6" [dir=forward tooltip="include"]
    "10" -> "11" [dir=forward tooltip="include"]
    "10" -> "12" [dir=forward tooltip="include"]
    "10" -> "13" [dir=forward tooltip="include"]
    "10" -> "5" [dir=forward tooltip="include"]
    "25" -> "16" [dir=forward tooltip="include"]
    "25" -> "7" [dir=forward tooltip="include"]
    "25" -> "14" [dir=forward tooltip="include"]
    "25" -> "26" [dir=forward tooltip="include"]
    "25" -> "15" [dir=forward tooltip="include"]
    "28" -> "16" [dir=forward tooltip="include"]
    "28" -> "14" [dir=forward tooltip="include"]
    "28" -> "15" [dir=forward tooltip="include"]
    "28" -> "10" [dir=forward tooltip="include"]
    "28" -> "23" [dir=forward tooltip="include"]
    "31" -> "16" [dir=forward tooltip="include"]
    "31" -> "5" [dir=forward tooltip="include"]
    "31" -> "6" [dir=forward tooltip="include"]
    "31" -> "8" [dir=forward tooltip="include"]
    "31" -> "32" [dir=forward tooltip="include"]
    "31" -> "3" [dir=forward tooltip="include"]
    "31" -> "33" [dir=forward tooltip="include"]
    "31" -> "4" [dir=forward tooltip="include"]
    "31" -> "20" [dir=forward tooltip="include"]
    "31" -> "34" [dir=forward tooltip="include"]
    "20" -> "16" [dir=forward tooltip="include"]
    "20" -> "5" [dir=forward tooltip="include"]
    "20" -> "19" [dir=forward tooltip="include"]
    "20" -> "7" [dir=forward tooltip="include"]
    "20" -> "21" [dir=forward tooltip="include"]
    "20" -> "22" [dir=forward tooltip="include"]
    "20" -> "25" [dir=forward tooltip="include"]
    "20" -> "23" [dir=forward tooltip="include"]
    "20" -> "10" [dir=forward tooltip="include"]
    "9" -> "10" [dir=forward tooltip="include"]
    "26" -> "7" [dir=forward tooltip="include"]
    "26" -> "9" [dir=forward tooltip="include"]
    "26" -> "14" [dir=forward tooltip="include"]
    "26" -> "22" [dir=forward tooltip="include"]
    "15" -> "16" [dir=forward tooltip="include"]
    "15" -> "17" [dir=forward tooltip="include"]
    "30" -> "4" [dir=forward tooltip="include"]
    "30" -> "31" [dir=forward tooltip="include"]
    "30" -> "5" [dir=forward tooltip="include"]
    "30" -> "35" [dir=forward tooltip="include"]
    "32" -> "6" [dir=forward tooltip="include"]
    "29" -> "3" [dir=forward tooltip="include"]
    "4" -> "5" [dir=forward tooltip="include"]
    "4" -> "6" [dir=forward tooltip="include"]
    "4" -> "8" [dir=forward tooltip="include"]
    "4" -> "9" [dir=forward tooltip="include"]
    "4" -> "14" [dir=forward tooltip="include"]
    "4" -> "15" [dir=forward tooltip="include"]
    "4" -> "18" [dir=forward tooltip="include"]
    "4" -> "20" [dir=forward tooltip="include"]
    "4" -> "27" [dir=forward tooltip="include"]
    "22" -> "9" [dir=forward tooltip="include"]
    "22" -> "10" [dir=forward tooltip="include"]
    "22" -> "23" [dir=forward tooltip="include"]
    "22" -> "5" [dir=forward tooltip="include"]
    "22" -> "7" [dir=forward tooltip="include"]
    "27" -> "16" [dir=forward tooltip="include"]
    "27" -> "5" [dir=forward tooltip="include"]
    "27" -> "14" [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)