posix_nifs.h

Include dependency graph for posix_nifs.h:

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

This graph shows which files directly or indirectly include posix_nifs.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/posix_nifs.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/posix_nifs.c"]
    "1" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/posix_nifs.h" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/posix_nifs.h" fillcolor="#BFBFBF"]
    "3" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/nifs.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/nifs.c"]
    "2" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/globalcontext.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/globalcontext.c"]
    "4" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_socket.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/otp_socket.c"]
    "1" -> "2" [dir=back tooltip="include"]
    "1" -> "3" [dir=back tooltip="include"]
    "1" -> "4" [dir=back tooltip="include"]
    "1" -> "5" [dir=back tooltip="include"]
}

Declaration of NIFs based on POSIX functions.

Functions

term posix_errno_to_term(int err, GlobalContext *glb)

Convenient function to return posix errors as atom.

POSIX does not define the values of errno errors, so this function makes sure Erlang code can interpret error codes whatever the platform.

Parameters:
  • err – the error code, typically obtained from errno(3)

  • glb – the global context

Returns:

an atom representing the error or an integer if the error number is not known.