mailbox.c

Include dependency graph for mailbox.c:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "3" [label="stdbool.h" tooltip="stdbool.h"]
    "6" [label="stdatomic.h" tooltip="stdatomic.h"]
    "19" [label="atom.h" tooltip="atom.h"]
    "27" [label="trace.h" tooltip="trace.h"]
    "20" [label="synclist.h" tooltip="synclist.h"]
    "10" [label="stdint.h" tooltip="stdint.h"]
    "15" [label="stdlib.h" tooltip="stdlib.h"]
    "16" [label="scheduler.h" tooltip="scheduler.h"]
    "17" [label="context.h" tooltip="context.h"]
    "11" [label="utils.h" tooltip="utils.h"]
    "7" [label="term_typedef.h" tooltip="term_typedef.h"]
    "12" [label="stddef.h" tooltip="stddef.h"]
    "8" [label="limits.h" tooltip="limits.h"]
    "24" [label="refc_binary.h" tooltip="refc_binary.h"]
    "23" [label="string.h" tooltip="string.h"]
    "1" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/mailbox.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/mailbox.c" fillcolor="#BFBFBF"]
    "2" [label="mailbox.h" tooltip="mailbox.h"]
    "22" [label="term.h" tooltip="term.h"]
    "14" [label="erl_nif.h" tooltip="erl_nif.h"]
    "25" [label="resources.h" tooltip="resources.h"]
    "5" [label="smp.h" tooltip="smp.h"]
    "18" [label="globalcontext.h" tooltip="globalcontext.h"]
    "13" [label="memory.h" tooltip="memory.h"]
    "21" [label="stdio.h" tooltip="stdio.h"]
    "26" [label="timer_list.h" tooltip="timer_list.h"]
    "9" [label="inttypes.h" tooltip="inttypes.h"]
    "4" [label="list.h" tooltip="list.h"]
    "19" -> "10" [dir=forward tooltip="include"]
    "19" -> "15" [dir=forward tooltip="include"]
    "20" -> "4" [dir=forward tooltip="include"]
    "20" -> "21" [dir=forward tooltip="include"]
    "20" -> "5" [dir=forward tooltip="include"]
    "16" -> "17" [dir=forward tooltip="include"]
    "16" -> "18" [dir=forward tooltip="include"]
    "17" -> "18" [dir=forward tooltip="include"]
    "17" -> "4" [dir=forward tooltip="include"]
    "17" -> "2" [dir=forward tooltip="include"]
    "17" -> "5" [dir=forward tooltip="include"]
    "17" -> "22" [dir=forward tooltip="include"]
    "17" -> "26" [dir=forward tooltip="include"]
    "11" -> "12" [dir=forward tooltip="include"]
    "7" -> "8" [dir=forward tooltip="include"]
    "7" -> "9" [dir=forward tooltip="include"]
    "7" -> "10" [dir=forward tooltip="include"]
    "24" -> "3" [dir=forward tooltip="include"]
    "24" -> "15" [dir=forward tooltip="include"]
    "24" -> "4" [dir=forward tooltip="include"]
    "24" -> "25" [dir=forward tooltip="include"]
    "24" -> "5" [dir=forward tooltip="include"]
    "1" -> "2" [dir=forward tooltip="include"]
    "1" -> "12" [dir=forward tooltip="include"]
    "1" -> "13" [dir=forward tooltip="include"]
    "1" -> "16" [dir=forward tooltip="include"]
    "1" -> "20" [dir=forward tooltip="include"]
    "1" -> "27" [dir=forward tooltip="include"]
    "2" -> "3" [dir=forward tooltip="include"]
    "2" -> "4" [dir=forward tooltip="include"]
    "2" -> "5" [dir=forward tooltip="include"]
    "2" -> "7" [dir=forward tooltip="include"]
    "2" -> "11" [dir=forward tooltip="include"]
    "22" -> "3" [dir=forward tooltip="include"]
    "22" -> "10" [dir=forward tooltip="include"]
    "22" -> "21" [dir=forward tooltip="include"]
    "22" -> "15" [dir=forward tooltip="include"]
    "22" -> "23" [dir=forward tooltip="include"]
    "22" -> "13" [dir=forward tooltip="include"]
    "22" -> "24" [dir=forward tooltip="include"]
    "22" -> "11" [dir=forward tooltip="include"]
    "22" -> "7" [dir=forward tooltip="include"]
    "14" -> "7" [dir=forward tooltip="include"]
    "25" -> "15" [dir=forward tooltip="include"]
    "25" -> "14" [dir=forward tooltip="include"]
    "25" -> "4" [dir=forward tooltip="include"]
    "25" -> "13" [dir=forward tooltip="include"]
    "5" -> "3" [dir=forward tooltip="include"]
    "5" -> "6" [dir=forward tooltip="include"]
    "18" -> "10" [dir=forward tooltip="include"]
    "18" -> "19" [dir=forward tooltip="include"]
    "18" -> "14" [dir=forward tooltip="include"]
    "18" -> "4" [dir=forward tooltip="include"]
    "18" -> "5" [dir=forward tooltip="include"]
    "18" -> "20" [dir=forward tooltip="include"]
    "18" -> "22" [dir=forward tooltip="include"]
    "18" -> "26" [dir=forward tooltip="include"]
    "13" -> "14" [dir=forward tooltip="include"]
    "13" -> "7" [dir=forward tooltip="include"]
    "13" -> "11" [dir=forward tooltip="include"]
    "13" -> "10" [dir=forward tooltip="include"]
    "13" -> "15" [dir=forward tooltip="include"]
    "26" -> "3" [dir=forward tooltip="include"]
    "26" -> "10" [dir=forward tooltip="include"]
    "26" -> "4" [dir=forward tooltip="include"]
}

Defines

ADDITIONAL_PROCESSING_MEMORY_SIZE

Functions

void mailbox_init(Mailbox *mbx)
_Static_assert (offsetof(struct Message, base)+offsetof(struct MailboxMessage, next)==offsetof(HeapFragment, next) ? 1 :0, "Message.base.next doesn't match HeapFragment.next")
_Static_assert (offsetof(struct Message, base)+offsetof(struct MailboxMessage, type)==offsetof(HeapFragment, heap_end) ? 1 :0, "Message.base.type doesn't match HeapFragment.heap_end")
_Static_assert (offsetof(struct Message, message)==offsetof(HeapFragment, storage) ? 1 :0, "Message.message doesn't match HeapFragment.storage[0]")
_Static_assert (offsetof(struct Message, heap_end)==offsetof(HeapFragment, storage[1]) ? 1 :0, "Message.heap_end doesn't match HeapFragment.storage[1]")
_Static_assert (sizeof(struct Message)==sizeof(HeapFragment)+2 *sizeof(term) ? 1 :0, "sizeof(Message) doesn't match sizeof(HeapFragment) + 2 terms")
_Static_assert (offsetof(struct TermSignal, base)+offsetof(struct MailboxMessage, next)==offsetof(HeapFragment, next) ? 1 :0, "TermSignal.base.next doesn't match HeapFragment.next")
_Static_assert (offsetof(struct TermSignal, base)+offsetof(struct MailboxMessage, type)==offsetof(HeapFragment, heap_end) ? 1 :0, "TermSignal.base.type doesn't match HeapFragment.heap_end")
_Static_assert (offsetof(struct TermSignal, signal_term)==offsetof(HeapFragment, storage) ? 1 :0, "TermSignal.signal_term doesn't match HeapFragment.storage[0]")
_Static_assert (offsetof(struct TermSignal, heap_end)==offsetof(HeapFragment, storage[1]) ? 1 :0, "TermSignal.heap_end doesn't match HeapFragment.storage[1]")
_Static_assert (sizeof(struct TermSignal)==sizeof(HeapFragment)+2 *sizeof(term) ? 1 :0, "sizeof(TermSignal) doesn't match sizeof(HeapFragment) + 2 terms")
HeapFragment *mailbox_message_to_heap_fragment(void *m, term *heap_end)
void mailbox_message_dispose(MailboxMessage *m, Heap *heap)
void mailbox_destroy(Mailbox *mbox, Heap *heap)
size_t mailbox_len(Mailbox *mbox)
size_t mailbox_size(Mailbox *mbox)
static void mailbox_post_message(Context *c, MailboxMessage *m)
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 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)
MailboxMessage *mailbox_process_outer_list(Mailbox *mbox)
void mailbox_next(Mailbox *mbox)
bool mailbox_peek(Context *c, term *out)
MailboxMessage *mailbox_take_message(Mailbox *mbox)
Message *mailbox_first(Mailbox *mbox)
void mailbox_crashdump(Context *ctx)