globalcontext.c

Include dependency graph for globalcontext.c:

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

Defines

SMP_SPINLOCK_LOCK(spinlock)
SMP_SPINLOCK_UNLOCK(spinlock)
SMP_MUTEX_LOCK(mutex)
SMP_MUTEX_UNLOCK(mutex)
SMP_RWLOCK_RDLOCK(lock)
SMP_RWLOCK_WRLOCK(lock)
SMP_RWLOCK_UNLOCK(lock)

Functions

GlobalContext *globalcontext_new()
COLD_FUNC void globalcontext_destroy (GlobalContext *glb)
Context *globalcontext_get_process_nolock(GlobalContext *glb, int32_t process_id)
Context *globalcontext_get_process_lock(GlobalContext *glb, int32_t process_id)
void globalcontext_get_process_unlock(GlobalContext *glb, Context *c)
bool globalcontext_process_exists(GlobalContext *glb, int32_t process_id)
void globalcontext_send_message(GlobalContext *glb, int32_t process_id, term t)
void globalcontext_send_message_nolock(GlobalContext *glb, int32_t process_id, term t)
void globalcontext_init_process(GlobalContext *glb, Context *ctx)
bool globalcontext_register_process(GlobalContext *glb, int atom_index, int local_process_id)
bool globalcontext_unregister_process(GlobalContext *glb, int atom_index)
void globalcontext_maybe_unregister_process_id(GlobalContext *glb, int target_process_id)
int globalcontext_get_registered_process(GlobalContext *glb, int atom_index)
bool globalcontext_is_atom_index_equal_to_atom_string(GlobalContext *glb, int atom_index_a, AtomString atom_string_b)
AtomString globalcontext_atomstring_from_term(GlobalContext *glb, term t)
term globalcontext_existing_term_from_atom_string(GlobalContext *glb, AtomString atom_string)
int globalcontext_insert_module(GlobalContext *global, Module *module)
Module *globalcontext_get_module(GlobalContext *global, AtomString module_name_atom)
Module *globalcontext_get_module_by_index(GlobalContext *global, int index)
bool globalcontext_demonitor(GlobalContext *global, uint64_t ref_ticks)
struct RegisteredProcess

Collaboration diagram for RegisteredProcess:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "1" [label="RegisteredProcess" tooltip="RegisteredProcess" fillcolor="#BFBFBF"]
    "2" [label="ListHead" tooltip="ListHead"]
    "1" -> "2" [dir=forward tooltip="usage"]
    "2" -> "2" [dir=forward tooltip="usage"]
}

Public Members

struct ListHead registered_processes_list_head
int atom_index
int local_process_id