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"]
    "2" [label="stdbool.h" tooltip="stdbool.h"]
    "5" [label="stdatomic.h" tooltip="stdatomic.h"]
    "7" [label="assert.h" tooltip="assert.h"]
    "10" [label="stdint.h" tooltip="stdint.h"]
    "11" [label="utils.h" tooltip="utils.h"]
    "6" [label="term_typedef.h" tooltip="term_typedef.h"]
    "12" [label="stddef.h" tooltip="stddef.h"]
    "8" [label="limits.h" tooltip="limits.h"]
    "1" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/mailbox.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/mailbox.h" fillcolor="#BFBFBF"]
    "4" [label="smp.h" tooltip="smp.h"]
    "9" [label="inttypes.h" tooltip="inttypes.h"]
    "3" [label="list.h" tooltip="list.h"]
    "11" -> "12" [dir=forward tooltip="include"]
    "6" -> "7" [dir=forward tooltip="include"]
    "6" -> "8" [dir=forward tooltip="include"]
    "6" -> "9" [dir=forward tooltip="include"]
    "6" -> "10" [dir=forward tooltip="include"]
    "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" -> "11" [dir=forward tooltip="include"]
    "4" -> "2" [dir=forward tooltip="include"]
    "4" -> "5" [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/runner/work/AtomVM/AtomVM/src/libAtomVM/bif.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/bif.c"]
    "4" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/bif.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/bif.h"]
    "29" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/platform_nifs.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/platform_nifs.h"]
    "17" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/posix_nifs.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/posix_nifs.c"]
    "23" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/inet.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/inet.c"]
    "22" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/inet.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/inet.h"]
    "12" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/scheduler.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/scheduler.c"]
    "40" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/scheduler.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/scheduler.h"]
    "2" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/context.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/context.c"]
    "3" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/context.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/context.h"]
    "38" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/port.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/port.c"]
    "39" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/port.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/port.h"]
    "31" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/stacktrace.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/stacktrace.c"]
    "30" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/stacktrace.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/stacktrace.h"]
    "18" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/refc_binary.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/refc_binary.c"]
    "41" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/mailbox.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/mailbox.c"]
    "1" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/mailbox.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/mailbox.h" fillcolor="#BFBFBF"]
    "6" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/module.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/module.c"]
    "28" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/module.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/module.h"]
    "27" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/term.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/term.c"]
    "25" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/interop.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/interop.c"]
    "16" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_ssl.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_ssl.c"]
    "21" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/interop.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/interop.h"]
    "37" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_ssl.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_ssl.h"]
    "19" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/resources.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/resources.c"]
    "26" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_crypto.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_crypto.c"]
    "34" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_crypto.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_crypto.h"]
    "24" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_net.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_net.c"]
    "35" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_net.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_net.h"]
    "13" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/erl_nif_priv.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/erl_nif_priv.h"]
    "32" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/sys.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/sys.h"]
    "7" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/nifs.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/nifs.c"]
    "33" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/nifs.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/nifs.h"]
    "8" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/opcodesswitch.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/opcodesswitch.h"]
    "10" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/debug.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/debug.c"]
    "9" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/debug.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/debug.h"]
    "14" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/globalcontext.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/globalcontext.c"]
    "11" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/memory.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/memory.c"]
    "15" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_socket.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_socket.c"]
    "36" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_socket.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_socket.h"]
    "20" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/externalterm.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/externalterm.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"]
    "29" -> "7" [dir=back tooltip="include"]
    "22" -> "23" [dir=back tooltip="include"]
    "22" -> "24" [dir=back tooltip="include"]
    "22" -> "15" [dir=back tooltip="include"]
    "22" -> "16" [dir=back tooltip="include"]
    "40" -> "41" [dir=back tooltip="include"]
    "40" -> "7" [dir=back tooltip="include"]
    "40" -> "8" [dir=back tooltip="include"]
    "40" -> "15" [dir=back tooltip="include"]
    "40" -> "12" [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" -> "20" [dir=back tooltip="include"]
    "3" -> "14" [dir=back tooltip="include"]
    "3" -> "21" [dir=back tooltip="include"]
    "3" -> "11" [dir=back tooltip="include"]
    "3" -> "6" [dir=back tooltip="include"]
    "3" -> "28" [dir=back tooltip="include"]
    "3" -> "7" [dir=back tooltip="include"]
    "3" -> "33" [dir=back tooltip="include"]
    "3" -> "26" [dir=back tooltip="include"]
    "3" -> "24" [dir=back tooltip="include"]
    "3" -> "15" [dir=back tooltip="include"]
    "3" -> "16" [dir=back tooltip="include"]
    "3" -> "38" [dir=back tooltip="include"]
    "3" -> "39" [dir=back tooltip="include"]
    "3" -> "18" [dir=back tooltip="include"]
    "3" -> "19" [dir=back tooltip="include"]
    "3" -> "40" [dir=back tooltip="include"]
    "3" -> "30" [dir=back tooltip="include"]
    "3" -> "27" [dir=back tooltip="include"]
    "39" -> "23" [dir=back tooltip="include"]
    "39" -> "7" [dir=back tooltip="include"]
    "39" -> "24" [dir=back tooltip="include"]
    "39" -> "15" [dir=back tooltip="include"]
    "39" -> "16" [dir=back tooltip="include"]
    "39" -> "38" [dir=back tooltip="include"]
    "30" -> "8" [dir=back tooltip="include"]
    "30" -> "31" [dir=back tooltip="include"]
    "1" -> "2" [dir=back tooltip="include"]
    "1" -> "3" [dir=back tooltip="include"]
    "1" -> "41" [dir=back tooltip="include"]
    "1" -> "7" [dir=back tooltip="include"]
    "1" -> "8" [dir=back tooltip="include"]
    "1" -> "15" [dir=back tooltip="include"]
    "1" -> "38" [dir=back tooltip="include"]
    "28" -> "4" [dir=back tooltip="include"]
    "28" -> "6" [dir=back tooltip="include"]
    "28" -> "7" [dir=back tooltip="include"]
    "28" -> "8" [dir=back tooltip="include"]
    "28" -> "29" [dir=back tooltip="include"]
    "28" -> "30" [dir=back tooltip="include"]
    "28" -> "32" [dir=back tooltip="include"]
    "21" -> "22" [dir=back tooltip="include"]
    "21" -> "25" [dir=back tooltip="include"]
    "21" -> "7" [dir=back tooltip="include"]
    "21" -> "26" [dir=back tooltip="include"]
    "21" -> "24" [dir=back tooltip="include"]
    "21" -> "15" [dir=back tooltip="include"]
    "21" -> "16" [dir=back tooltip="include"]
    "21" -> "17" [dir=back tooltip="include"]
    "21" -> "27" [dir=back tooltip="include"]
    "37" -> "16" [dir=back tooltip="include"]
    "34" -> "26" [dir=back tooltip="include"]
    "35" -> "24" [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"]
    "13" -> "18" [dir=back tooltip="include"]
    "13" -> "19" [dir=back tooltip="include"]
    "32" -> "2" [dir=back tooltip="include"]
    "32" -> "14" [dir=back tooltip="include"]
    "32" -> "6" [dir=back tooltip="include"]
    "32" -> "7" [dir=back tooltip="include"]
    "32" -> "15" [dir=back tooltip="include"]
    "32" -> "19" [dir=back tooltip="include"]
    "32" -> "12" [dir=back tooltip="include"]
    "33" -> "6" [dir=back tooltip="include"]
    "33" -> "7" [dir=back tooltip="include"]
    "33" -> "8" [dir=back tooltip="include"]
    "33" -> "26" [dir=back tooltip="include"]
    "33" -> "34" [dir=back tooltip="include"]
    "33" -> "24" [dir=back tooltip="include"]
    "33" -> "35" [dir=back tooltip="include"]
    "33" -> "15" [dir=back tooltip="include"]
    "33" -> "36" [dir=back tooltip="include"]
    "33" -> "16" [dir=back tooltip="include"]
    "33" -> "37" [dir=back tooltip="include"]
    "33" -> "17" [dir=back tooltip="include"]
    "8" -> "2" [dir=back tooltip="include"]
    "8" -> "6" [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"]
    "36" -> "15" [dir=back tooltip="include"]
    "36" -> "16" [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::[anonymous] [anonymous]
struct Message

Collaboration diagram for Message:

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

Public Members

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