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"]
    "6" [label="atom.h" tooltip="atom.h"]
    "24" [label="atomshashtable.h" tooltip="atomshashtable.h"]
    "25" [label="avmpack.h" tooltip="avmpack.h"]
    "26" [label="context.h" tooltip="context.h"]
    "28" [label="defaultatoms.h" tooltip="defaultatoms.h"]
    "8" [label="erl_nif.h" tooltip="erl_nif.h"]
    "29" [label="erl_nif_priv.h" tooltip="erl_nif_priv.h"]
    "31" [label="exportedfunction.h" tooltip="exportedfunction.h"]
    "1" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/globalcontext.c" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/globalcontext.c" fillcolor="#BFBFBF"]
    "4" [label="globalcontext.h" tooltip="globalcontext.h"]
    "11" [label="list.h" tooltip="list.h"]
    "27" [label="mailbox.h" tooltip="mailbox.h"]
    "18" [label="memory.h" tooltip="memory.h"]
    "33" [label="module.h" tooltip="module.h"]
    "30" [label="posix_nifs.h" tooltip="posix_nifs.h"]
    "21" [label="refc_binary.h" tooltip="refc_binary.h"]
    "22" [label="resources.h" tooltip="resources.h"]
    "12" [label="smp.h" tooltip="smp.h"]
    "15" [label="synclist.h" tooltip="synclist.h"]
    "32" [label="sys.h" tooltip="sys.h"]
    "17" [label="term.h" tooltip="term.h"]
    "9" [label="term_typedef.h" tooltip="term_typedef.h"]
    "23" [label="timer_list.h" tooltip="timer_list.h"]
    "19" [label="utils.h" tooltip="utils.h"]
    "34" [label="valueshashtable.h" tooltip="valueshashtable.h"]
    "10" [label="inttypes.h" tooltip="inttypes.h"]
    "2" [label="limits.h" tooltip="limits.h"]
    "14" [label="stdatomic.h" tooltip="stdatomic.h"]
    "13" [label="stdbool.h" tooltip="stdbool.h"]
    "20" [label="stddef.h" tooltip="stddef.h"]
    "5" [label="stdint.h" tooltip="stdint.h"]
    "16" [label="stdio.h" tooltip="stdio.h"]
    "7" [label="stdlib.h" tooltip="stdlib.h"]
    "3" [label="string.h" tooltip="string.h"]
    "35" [label="time.h" tooltip="time.h"]
    "6" -> "5" [dir=forward tooltip="include"]
    "6" -> "7" [dir=forward tooltip="include"]
    "24" -> "6" [dir=forward tooltip="include"]
    "25" -> "4" [dir=forward tooltip="include"]
    "25" -> "11" [dir=forward tooltip="include"]
    "25" -> "13" [dir=forward tooltip="include"]
    "25" -> "20" [dir=forward tooltip="include"]
    "25" -> "5" [dir=forward tooltip="include"]
    "26" -> "4" [dir=forward tooltip="include"]
    "26" -> "11" [dir=forward tooltip="include"]
    "26" -> "27" [dir=forward tooltip="include"]
    "26" -> "12" [dir=forward tooltip="include"]
    "26" -> "17" [dir=forward tooltip="include"]
    "26" -> "23" [dir=forward tooltip="include"]
    "28" -> "4" [dir=forward tooltip="include"]
    "8" -> "9" [dir=forward tooltip="include"]
    "29" -> "26" [dir=forward tooltip="include"]
    "29" -> "18" [dir=forward tooltip="include"]
    "31" -> "17" [dir=forward tooltip="include"]
    "1" -> "2" [dir=forward tooltip="include"]
    "1" -> "3" [dir=forward tooltip="include"]
    "1" -> "4" [dir=forward tooltip="include"]
    "1" -> "24" [dir=forward tooltip="include"]
    "1" -> "25" [dir=forward tooltip="include"]
    "1" -> "26" [dir=forward tooltip="include"]
    "1" -> "28" [dir=forward tooltip="include"]
    "1" -> "29" [dir=forward tooltip="include"]
    "1" -> "11" [dir=forward tooltip="include"]
    "1" -> "30" [dir=forward tooltip="include"]
    "1" -> "21" [dir=forward tooltip="include"]
    "1" -> "22" [dir=forward tooltip="include"]
    "1" -> "15" [dir=forward tooltip="include"]
    "1" -> "32" [dir=forward tooltip="include"]
    "1" -> "19" [dir=forward tooltip="include"]
    "1" -> "34" [dir=forward tooltip="include"]
    "4" -> "5" [dir=forward tooltip="include"]
    "4" -> "6" [dir=forward tooltip="include"]
    "4" -> "8" [dir=forward tooltip="include"]
    "4" -> "11" [dir=forward tooltip="include"]
    "4" -> "12" [dir=forward tooltip="include"]
    "4" -> "15" [dir=forward tooltip="include"]
    "4" -> "17" [dir=forward tooltip="include"]
    "4" -> "23" [dir=forward tooltip="include"]
    "27" -> "13" [dir=forward tooltip="include"]
    "27" -> "11" [dir=forward tooltip="include"]
    "27" -> "12" [dir=forward tooltip="include"]
    "27" -> "9" [dir=forward tooltip="include"]
    "27" -> "19" [dir=forward tooltip="include"]
    "18" -> "8" [dir=forward tooltip="include"]
    "18" -> "9" [dir=forward tooltip="include"]
    "18" -> "19" [dir=forward tooltip="include"]
    "18" -> "5" [dir=forward tooltip="include"]
    "18" -> "7" [dir=forward tooltip="include"]
    "33" -> "13" [dir=forward tooltip="include"]
    "33" -> "5" [dir=forward tooltip="include"]
    "33" -> "6" [dir=forward tooltip="include"]
    "33" -> "24" [dir=forward tooltip="include"]
    "33" -> "26" [dir=forward tooltip="include"]
    "33" -> "31" [dir=forward tooltip="include"]
    "33" -> "4" [dir=forward tooltip="include"]
    "33" -> "17" [dir=forward tooltip="include"]
    "33" -> "34" [dir=forward tooltip="include"]
    "30" -> "31" [dir=forward tooltip="include"]
    "30" -> "4" [dir=forward tooltip="include"]
    "30" -> "17" [dir=forward tooltip="include"]
    "21" -> "13" [dir=forward tooltip="include"]
    "21" -> "7" [dir=forward tooltip="include"]
    "21" -> "11" [dir=forward tooltip="include"]
    "21" -> "22" [dir=forward tooltip="include"]
    "21" -> "12" [dir=forward tooltip="include"]
    "22" -> "7" [dir=forward tooltip="include"]
    "22" -> "8" [dir=forward tooltip="include"]
    "22" -> "11" [dir=forward tooltip="include"]
    "12" -> "13" [dir=forward tooltip="include"]
    "12" -> "14" [dir=forward tooltip="include"]
    "15" -> "11" [dir=forward tooltip="include"]
    "15" -> "16" [dir=forward tooltip="include"]
    "15" -> "12" [dir=forward tooltip="include"]
    "32" -> "4" [dir=forward tooltip="include"]
    "32" -> "33" [dir=forward tooltip="include"]
    "32" -> "5" [dir=forward tooltip="include"]
    "32" -> "35" [dir=forward tooltip="include"]
    "17" -> "13" [dir=forward tooltip="include"]
    "17" -> "5" [dir=forward tooltip="include"]
    "17" -> "16" [dir=forward tooltip="include"]
    "17" -> "7" [dir=forward tooltip="include"]
    "17" -> "3" [dir=forward tooltip="include"]
    "17" -> "18" [dir=forward tooltip="include"]
    "17" -> "21" [dir=forward tooltip="include"]
    "17" -> "19" [dir=forward tooltip="include"]
    "17" -> "9" [dir=forward tooltip="include"]
    "9" -> "2" [dir=forward tooltip="include"]
    "9" -> "10" [dir=forward tooltip="include"]
    "9" -> "5" [dir=forward tooltip="include"]
    "23" -> "13" [dir=forward tooltip="include"]
    "23" -> "5" [dir=forward tooltip="include"]
    "23" -> "11" [dir=forward tooltip="include"]
    "19" -> "20" [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)
int globalcontext_insert_atom(GlobalContext *glb, AtomString atom_string)
int globalcontext_insert_atom_maybe_copy(GlobalContext *glb, AtomString atom_string, int copy)
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"]
    "2" [label="ListHead" tooltip="ListHead"]
    "1" [label="RegisteredProcess" tooltip="RegisteredProcess" fillcolor="#BFBFBF"]
    "2" -> "2" [dir=forward tooltip="usage"]
    "1" -> "2" [dir=forward tooltip="usage"]
}

Public Members

struct ListHead registered_processes_list_head
int atom_index
int local_process_id