mailbox.h

Include dependency graph for mailbox.h:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "3" [label="list.h" tooltip="list.h"]
    "1" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/mailbox.h" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/mailbox.h" fillcolor="#BFBFBF"]
    "4" [label="smp.h" tooltip="smp.h"]
    "6" [label="term_typedef.h" tooltip="term_typedef.h"]
    "10" [label="utils.h" tooltip="utils.h"]
    "8" [label="inttypes.h" tooltip="inttypes.h"]
    "7" [label="limits.h" tooltip="limits.h"]
    "5" [label="stdatomic.h" tooltip="stdatomic.h"]
    "2" [label="stdbool.h" tooltip="stdbool.h"]
    "11" [label="stddef.h" tooltip="stddef.h"]
    "9" [label="stdint.h" tooltip="stdint.h"]
    "1" -> "2" [dir=forward tooltip="include"]
    "1" -> "3" [dir=forward tooltip="include"]
    "1" -> "4" [dir=forward tooltip="include"]
    "1" -> "6" [dir=forward tooltip="include"]
    "1" -> "10" [dir=forward tooltip="include"]
    "4" -> "2" [dir=forward tooltip="include"]
    "4" -> "5" [dir=forward tooltip="include"]
    "6" -> "7" [dir=forward tooltip="include"]
    "6" -> "8" [dir=forward tooltip="include"]
    "6" -> "9" [dir=forward tooltip="include"]
    "10" -> "11" [dir=forward tooltip="include"]
}

This graph shows which files directly or indirectly include mailbox.h:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "5" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/bif.c" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/bif.c"]
    "4" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/bif.h" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/bif.h"]
    "2" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/context.c" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/context.c"]
    "3" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/context.h" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/context.h"]
    "10" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/debug.c" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/debug.c"]
    "9" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/debug.h" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/debug.h"]
    "13" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/erl_nif_priv.h" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/erl_nif_priv.h"]
    "18" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/externalterm.c" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/externalterm.c"]
    "14" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/globalcontext.c" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/globalcontext.c"]
    "20" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/interop.c" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/interop.c"]
    "19" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/interop.h" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/interop.h"]
    "31" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/mailbox.c" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/mailbox.c"]
    "1" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/mailbox.h" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/mailbox.h" fillcolor="#BFBFBF"]
    "11" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/memory.c" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/memory.c"]
    "6" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/module.c" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/module.c"]
    "22" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/module.h" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/module.h"]
    "7" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/nifs.c" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/nifs.c"]
    "27" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/nifs.h" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/nifs.h"]
    "8" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/opcodesswitch.h" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/opcodesswitch.h"]
    "23" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/platform_nifs.h" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/platform_nifs.h"]
    "28" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/port.c" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/port.c"]
    "29" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/port.h" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/port.h"]
    "15" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/posix_nifs.c" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/posix_nifs.c"]
    "16" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/refc_binary.c" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/refc_binary.c"]
    "17" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/resources.c" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/resources.c"]
    "12" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/scheduler.c" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/scheduler.c"]
    "30" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/scheduler.h" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/scheduler.h"]
    "25" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/stacktrace.c" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/stacktrace.c"]
    "24" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/stacktrace.h" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/stacktrace.h"]
    "26" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/sys.h" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/sys.h"]
    "21" [label="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/term.c" tooltip="/home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/term.c"]
    "4" -> "5" [dir=back tooltip="include"]
    "4" -> "6" [dir=back tooltip="include"]
    "4" -> "7" [dir=back tooltip="include"]
    "4" -> "8" [dir=back tooltip="include"]
    "3" -> "4" [dir=back tooltip="include"]
    "3" -> "2" [dir=back tooltip="include"]
    "3" -> "9" [dir=back tooltip="include"]
    "3" -> "13" [dir=back tooltip="include"]
    "3" -> "18" [dir=back tooltip="include"]
    "3" -> "14" [dir=back tooltip="include"]
    "3" -> "19" [dir=back tooltip="include"]
    "3" -> "11" [dir=back tooltip="include"]
    "3" -> "6" [dir=back tooltip="include"]
    "3" -> "22" [dir=back tooltip="include"]
    "3" -> "7" [dir=back tooltip="include"]
    "3" -> "27" [dir=back tooltip="include"]
    "3" -> "28" [dir=back tooltip="include"]
    "3" -> "29" [dir=back tooltip="include"]
    "3" -> "16" [dir=back tooltip="include"]
    "3" -> "17" [dir=back tooltip="include"]
    "3" -> "30" [dir=back tooltip="include"]
    "3" -> "24" [dir=back tooltip="include"]
    "3" -> "21" [dir=back tooltip="include"]
    "9" -> "10" [dir=back tooltip="include"]
    "9" -> "11" [dir=back tooltip="include"]
    "9" -> "8" [dir=back tooltip="include"]
    "9" -> "12" [dir=back tooltip="include"]
    "13" -> "2" [dir=back tooltip="include"]
    "13" -> "14" [dir=back tooltip="include"]
    "13" -> "11" [dir=back tooltip="include"]
    "13" -> "15" [dir=back tooltip="include"]
    "13" -> "16" [dir=back tooltip="include"]
    "13" -> "17" [dir=back tooltip="include"]
    "19" -> "20" [dir=back tooltip="include"]
    "19" -> "7" [dir=back tooltip="include"]
    "19" -> "15" [dir=back tooltip="include"]
    "19" -> "21" [dir=back tooltip="include"]
    "1" -> "2" [dir=back tooltip="include"]
    "1" -> "3" [dir=back tooltip="include"]
    "1" -> "31" [dir=back tooltip="include"]
    "1" -> "7" [dir=back tooltip="include"]
    "1" -> "8" [dir=back tooltip="include"]
    "1" -> "28" [dir=back tooltip="include"]
    "22" -> "4" [dir=back tooltip="include"]
    "22" -> "6" [dir=back tooltip="include"]
    "22" -> "7" [dir=back tooltip="include"]
    "22" -> "8" [dir=back tooltip="include"]
    "22" -> "23" [dir=back tooltip="include"]
    "22" -> "24" [dir=back tooltip="include"]
    "22" -> "26" [dir=back tooltip="include"]
    "27" -> "6" [dir=back tooltip="include"]
    "27" -> "7" [dir=back tooltip="include"]
    "27" -> "8" [dir=back tooltip="include"]
    "27" -> "15" [dir=back tooltip="include"]
    "8" -> "2" [dir=back tooltip="include"]
    "8" -> "6" [dir=back tooltip="include"]
    "23" -> "7" [dir=back tooltip="include"]
    "29" -> "7" [dir=back tooltip="include"]
    "29" -> "28" [dir=back tooltip="include"]
    "30" -> "31" [dir=back tooltip="include"]
    "30" -> "7" [dir=back tooltip="include"]
    "30" -> "8" [dir=back tooltip="include"]
    "30" -> "12" [dir=back tooltip="include"]
    "24" -> "8" [dir=back tooltip="include"]
    "24" -> "25" [dir=back tooltip="include"]
    "26" -> "2" [dir=back tooltip="include"]
    "26" -> "14" [dir=back tooltip="include"]
    "26" -> "6" [dir=back tooltip="include"]
    "26" -> "7" [dir=back tooltip="include"]
    "26" -> "17" [dir=back tooltip="include"]
    "26" -> "12" [dir=back tooltip="include"]
}

Defines

TYPEDEF_CONTEXT
TYPEDEF_HEAP

Typedefs

typedef struct Context Context
typedef struct Heap Heap
typedef struct Message Message
typedef struct MailboxMessage MailboxMessage

Enums

enum MessageType

Values:

enumerator NormalMessage
enumerator KillSignal
enumerator GCSignal
enumerator ProcessInfoRequestSignal
enumerator TrapAnswerSignal
enumerator TrapExceptionSignal
enumerator FlushMonitorSignal
enumerator FlushInfoMonitorSignal

Functions

void mailbox_init(Mailbox *mbox)
size_t mailbox_len(Mailbox *mbox)
size_t mailbox_size(Mailbox *mbox)
MailboxMessage *mailbox_process_outer_list(Mailbox *mbox)
void mailbox_send(Context *c, term t)
void mailbox_send_term_signal(Context *c, enum MessageType type, term t)
void mailbox_send_built_in_atom_signal(Context *c, enum MessageType type, term atom)
void mailbox_send_built_in_atom_request_signal(Context *c, enum MessageType type, int32_t sender_pid, term atom)
void mailbox_send_ref_signal(Context *c, enum MessageType type, uint64_t ref_ticks)
void mailbox_send_empty_body_signal(Context *c, enum MessageType type)
void mailbox_reset(Mailbox *mbox)
void mailbox_next(Mailbox *mbox)
static inline bool mailbox_has_next(Mailbox *mbox)
bool mailbox_peek(Context *ctx, term *out)
MailboxMessage *mailbox_take_message(Mailbox *mbox)
Message *mailbox_first(Mailbox *mbox)
void mailbox_destroy(Mailbox *mbox, Heap *heap)
void mailbox_message_dispose(MailboxMessage *m, Heap *heap)
static inline void mailbox_remove_message(Mailbox *mbox, Heap *heap)
void mailbox_crashdump(Context *ctx)
struct MailboxMessage

Collaboration diagram for MailboxMessage:

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

Public Members

MailboxMessage *next
enum MessageType type
term *heap_fragment_end
union MailboxMessage
struct Message

Collaboration diagram for Message:

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

Public Members

MailboxMessage base
term message
term *heap_end
term storage[]
struct TermSignal

Collaboration diagram for TermSignal:

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

Public Members

MailboxMessage base
term signal_term
term *heap_end
term storage[]
struct BuiltInAtomSignal

Collaboration diagram for BuiltInAtomSignal:

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

Public Members

MailboxMessage base
term atom
struct BuiltInAtomRequestSignal

Collaboration diagram for BuiltInAtomRequestSignal:

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

Public Members

MailboxMessage base
int32_t sender_pid
term atom
struct RefSignal

Collaboration diagram for RefSignal:

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

Public Members

MailboxMessage base
uint64_t ref_ticks
struct Mailbox

Collaboration diagram for Mailbox:

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

Public Members

MailboxMessage *ATOMIC outer_first
MailboxMessage *inner_first
MailboxMessage *inner_last
MailboxMessage *receive_pointer
MailboxMessage *receive_pointer_prev