portnifloader.h

Include dependency graph for portnifloader.h:

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

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

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "2" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/portnifloader.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/portnifloader.c"]
    "1" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/portnifloader.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/portnifloader.h" fillcolor="#BFBFBF"]
    "1" -> "2" [dir=back tooltip="include"]
}

Defines

REGISTER_PORT_DRIVER(NAME, INIT_CB, DESTROY_CB, CREATE_CB)     struct PortDriverDef

NAME##_port_driver_def = {                   \

.port_driver_name = #NAME,                                    \

.port_driver_init_cb = INIT_CB,                               \

.port_driver_destroy_cb = DESTROY_CB,                         \

.port_driver_create_port_cb = CREATE_CB                       \

};                                                                \

\

struct

PortDriverDefListItem

NAME##_port_driver_def_list_item = { \

.def = &NAME##_port_driver_def                                \

};                                                                \

\

__attribute__

((constructor)) void NAME##register_port_driver()    \

{                                                                 \

NAME##_port_driver_def_list_item.next =

port_driver_list;     \         port_driver_list

= &NAME##_port_driver_def_list_item;         \

}


REGISTER_NIF_COLLECTION(NAME, INIT_CB, DESTROY_CB, RESOLVE_NIF_CB)     struct NifCollectionDef

NAME##_nif_collection_def = {                   \

.nif_collection_init_cb = INIT_CB,                                  \

.nif_collection_destroy_cb = DESTROY_CB,                            \

.nif_collection_resolve_nif_cb = RESOLVE_NIF_CB                     \

};                                                                      \

\

struct

NifCollectionDefListItem

NAME##_nif_collection_def_list_item = { \

.def = &NAME##_nif_collection_def                                   \

};                                                                      \

\

__attribute__

((constructor)) void NAME##_nif()                          \

{                                                                       \

NAME##_nif_collection_def_list_item.next =

nif_collection_list;     \         nif_collection_list

= &NAME##_nif_collection_def_list_item;         \

}


Typedefs

typedef void (*port_driver_init_t)(GlobalContext *global)
typedef void (*port_driver_destroy_t)(GlobalContext *global)
typedef Context *(*port_driver_create_port_t)(GlobalContext *global, term opts)
typedef void (*nif_collection_init_t)(GlobalContext *global)
typedef void (*nif_collection_destroy_t)(GlobalContext *global)
typedef const struct Nif *(*nif_collection_resolve_nif_t)(const char *name)

Functions

void port_driver_init_all(GlobalContext *global)
void port_driver_destroy_all(GlobalContext *global)
Context *port_driver_create_port(const char *port_name, GlobalContext *global, term opts)
void nif_collection_init_all(GlobalContext *global)
void nif_collection_destroy_all(GlobalContext *global)
const struct Nif *nif_collection_resolve_nif(const char *name)

Variables

struct PortDriverDefListItem *port_driver_list
struct NifCollectionDefListItem *nif_collection_list
struct PortDriverDef
#include <portnifloader.h>

Public Members

const char *port_driver_name
const port_driver_init_t port_driver_init_cb
const port_driver_destroy_t port_driver_destroy_cb
const port_driver_create_port_t port_driver_create_port_cb
struct PortDriverDefListItem
#include <portnifloader.h>

Collaboration diagram for PortDriverDefListItem:

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

Public Members

struct PortDriverDefListItem *next
const struct PortDriverDef *const def
struct NifCollectionDef
#include <portnifloader.h>

Public Members

const nif_collection_init_t nif_collection_init_cb
const nif_collection_destroy_t nif_collection_destroy_cb
const nif_collection_resolve_nif_t nif_collection_resolve_nif_cb
struct NifCollectionDefListItem
#include <portnifloader.h>

Collaboration diagram for NifCollectionDefListItem:

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

Public Members

struct NifCollectionDefListItem *next
const struct NifCollectionDef *const def