.. Copyright 2023 Winford (Uncle Grumpy) <winford@object.stream>
..
.. SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

:orphan:

.. c:namespace:: NULL
.. c:namespace:: libAtomVM
.. c:namespace-push:: functions

---------------------
Functions
---------------------

.. toctree::
   :maxdepth: 3
   :caption: Functions

.. doxygenfunction:: atom_are_equals
.. doxygenfunction:: atom_string_data
.. doxygenfunction:: atom_string_len
.. doxygenfunction:: atom_string_to_c
.. doxygenfunction:: atom_write_mfa
.. doxygenfunction:: avmpack_find_section_by_flag
.. doxygenfunction:: avmpack_find_section_by_name
.. doxygenfunction:: avmpack_fold
.. doxygenfunction:: avmpack_is_valid
.. doxygenfunction:: bitstring_copy_bits
.. doxygenfunction:: bitstring_copy_bits_incomplete_bytes
.. doxygenfunction:: bitstring_insert_utf16
.. doxygenfunction:: bitstring_insert_utf32
.. doxygenfunction:: bitstring_insert_utf8
.. doxygenfunction:: bitstring_match_utf16
.. doxygenfunction:: bitstring_match_utf32
.. doxygenfunction:: bitstring_match_utf8
.. doxygenfunction:: bitstring_utf16_decode
.. doxygenfunction:: bitstring_utf16_encode
.. doxygenfunction:: bitstring_utf16_size
.. doxygenfunction:: bitstring_utf32_decode
.. doxygenfunction:: bitstring_utf32_encode
.. doxygenfunction:: bitstring_utf8_decode
.. doxygenfunction:: bitstring_utf8_encode
.. doxygenfunction:: bitstring_utf8_size
.. doxygenfunction:: context_avail_free_memory
.. doxygenfunction:: context_clean_registers
.. doxygenfunction:: context_destroy
.. doxygenfunction:: context_ensure_fpregs
.. doxygenfunction:: context_execute_loop
.. doxygenfunction:: context_get_flags
.. doxygenfunction:: context_get_process_info
.. doxygenfunction:: context_is_port_driver
.. doxygenfunction:: context_is_term_equal_to_atom_string
.. doxygenfunction:: context_link
.. doxygenfunction:: context_message_queue_len
.. doxygenfunction:: context_monitor
.. doxygenfunction:: context_new
.. doxygenfunction:: context_process_flush_monitor_signal
.. doxygenfunction:: context_process_kill_signal
.. doxygenfunction:: context_process_process_info_request_signal
.. doxygenfunction:: context_process_signal_trap_answer
.. doxygenfunction:: context_resource_monitor
.. doxygenfunction:: context_size
.. doxygenfunction:: context_stack_base
.. doxygenfunction:: context_stack_size
.. doxygenfunction:: context_unlink
.. doxygenfunction:: context_update_flags
.. doxygenfunction:: debug_dump_context
.. doxygenfunction:: debug_dump_heap
.. doxygenfunction:: debug_dump_memory
.. doxygenfunction:: debug_dump_registers
.. doxygenfunction:: debug_dump_stack
.. doxygenfunction:: debug_print_processes_list
.. doxygenfunction:: destroy_resource_monitors
.. doxygenfunction:: enif_alloc_resource
.. doxygenfunction:: enif_compare_monitors
.. doxygenfunction:: enif_demonitor_process
.. doxygenfunction:: enif_get_resource
.. doxygenfunction:: enif_init_resource_type
.. doxygenfunction:: enif_keep_resource
.. doxygenfunction:: enif_make_resource
.. doxygenfunction:: enif_monitor_process
.. doxygenfunction:: enif_release_resource
.. doxygenfunction:: enif_select
.. doxygenfunction:: event_listener_add_to_polling_set
.. doxygenfunction:: event_listener_is_event
.. doxygenfunction:: externalterm_from_binary
.. doxygenfunction:: externalterm_to_binary
.. doxygenfunction:: externalterm_to_term
.. TODO: figure out why  Doxgen cant find externalterm_to_term_internal in externalterm.c
.. c:function:: static term externalterm_to_term_internal(const void *external_term, size_t size, Context *ctx, ExternalTermOpts opts, size_t *bytes_read, bool copy)

   Copy an external term to internal storage.

   :param external_term: buffer containing external term
   :param size:          size of the external_term
   :param ctx:           current context in which terms may be stored
   :param opts:          additional opts, such as ExternalTermToHeapFragment for storing parsed
                         terms in a heap fragment, otherwise terms are stored in the context heap.
   :param bytes_read:    the number of bytes read off external_term in order to yield a term
   :param copy:          whether to copy binary data and atom strings (pass `true`, unless
                         `external_term` is a const binary and will not be deallocated)
   :returns:             the parsed term

.. doxygenfunction:: globalcontext_atomstring_from_term
.. doxygenfunction:: globalcontext_demonitor
.. doxygenfunction:: globalcontext_destroy
.. doxygenfunction:: globalcontext_existing_term_from_atom_string
.. doxygenfunction:: globalcontext_get_module
.. doxygenfunction:: globalcontext_get_module_by_index
.. doxygenfunction:: globalcontext_get_process_lock
.. doxygenfunction:: globalcontext_get_process_nolock
.. doxygenfunction:: globalcontext_get_process_unlock
.. doxygenfunction:: globalcontext_get_registered_process
.. doxygenfunction:: globalcontext_init_process
.. doxygenfunction:: globalcontext_insert_atom
.. doxygenfunction:: globalcontext_insert_atom_maybe_copy
.. doxygenfunction:: globalcontext_insert_module
.. doxygenfunction:: globalcontext_is_atom_index_equal_to_atom_string
.. doxygenfunction:: globalcontext_is_term_equal_to_atom_string
.. doxygenfunction:: globalcontext_make_atom
.. doxygenfunction:: globalcontext_maybe_unregister_process_id
.. doxygenfunction:: globalcontext_new
.. doxygenfunction:: globalcontext_process_exists
.. doxygenfunction:: globalcontext_process_task_driver_queues
.. doxygenfunction:: globalcontext_refc_decrement_refcount_from_task
.. doxygenfunction:: globalcontext_register_process
.. doxygenfunction:: globalcontext_send_message
.. doxygenfunction:: globalcontext_send_message_from_task
.. doxygenfunction:: globalcontext_send_message_nolock
.. doxygenfunction:: globalcontext_unregister_process
.. doxygenfunction:: iff_is_valid_beam
.. doxygenfunction:: inet_addr4_to_uint32
.. doxygenfunction:: inet_atom_to_domain
.. doxygenfunction:: inet_atom_to_protocol
.. doxygenfunction:: inet_atom_to_type
.. doxygenfunction:: inet_make_addr4
.. doxygenfunction:: interop_atom_term_select_atom
.. doxygenfunction:: interop_atom_term_select_int
.. doxygenfunction:: interop_kv_get_value
.. doxygenfunction:: interop_kv_get_value_default
.. doxygenfunction:: listener_event_remove_from_polling_set
.. doxygenfunction:: mailbox_crashdump
.. doxygenfunction:: mailbox_destroy
.. doxygenfunction:: mailbox_first
.. doxygenfunction:: mailbox_has_next
.. doxygenfunction:: mailbox_init
.. doxygenfunction:: mailbox_len
.. doxygenfunction:: mailbox_message_create_from_term
.. doxygenfunction:: mailbox_message_dispose
.. doxygenfunction:: mailbox_next
.. doxygenfunction:: mailbox_peek
.. doxygenfunction:: mailbox_process_outer_list
.. doxygenfunction:: mailbox_remove_message
.. doxygenfunction:: mailbox_reset
.. doxygenfunction:: mailbox_send
.. doxygenfunction:: mailbox_send_built_in_atom_request_signal
.. doxygenfunction:: mailbox_send_built_in_atom_signal
.. doxygenfunction:: mailbox_send_empty_body_signal
.. doxygenfunction:: mailbox_send_ref_signal
.. doxygenfunction:: mailbox_send_term_signal
.. doxygenfunction:: mailbox_size
.. doxygenfunction:: mailbox_take_message
.. doxygenfunction:: memory_copy_term_tree
.. doxygenfunction:: memory_copy_term_tree_to_storage
.. doxygenfunction:: memory_destroy_heap
.. doxygenfunction:: memory_destroy_heap_fragment
.. doxygenfunction:: memory_destroy_heap_from_task
.. doxygenfunction:: memory_ensure_free_opt
.. doxygenfunction:: memory_ensure_free_with_roots
.. doxygenfunction:: memory_erl_nif_env_ensure_free
.. doxygenfunction:: memory_estimate_usage
.. doxygenfunction:: memory_heap_alloc
.. doxygenfunction:: memory_heap_append_fragment
.. doxygenfunction:: memory_heap_append_heap
.. doxygenfunction:: memory_heap_fragment_memory_size
.. doxygenfunction:: memory_heap_trim
.. doxygenfunction:: memory_heap_youngest_size
.. doxygenfunction:: memory_heap_memory_size
.. doxygenfunction:: memory_init_heap
.. doxygenfunction:: memory_init_heap_root_fragment
.. doxygenfunction:: memory_sweep_mso_list
.. doxygenfunction:: module_get_atom_string_by_id
.. doxygenfunction:: module_get_atom_term_by_id
.. doxygenfunction:: module_get_exported_functions
.. doxygenfunction:: module_get_exported_functions_count
.. doxygenfunction:: module_get_exported_functions_list_size
.. doxygenfunction:: module_get_name
.. doxygenfunction:: module_has_line_chunk
.. doxygenfunction:: module_load_literal
.. doxygenfunction:: module_new_from_iff_binary
.. doxygenfunction:: module_resolve_function
.. doxygenfunction:: module_search_exported_function
.. doxygenfunction:: otp_socket_lwip_enqueue
.. doxygenfunction:: platform_nifs_get_nif
.. doxygenfunction:: posix_errno_to_term
.. doxygenfunction:: process_listener_handler
.. doxygenfunction:: refc_binary_create_refc
.. doxygenfunction:: refc_binary_create_resource
.. doxygenfunction:: refc_binary_decrement_refcount
.. doxygenfunction:: refc_binary_destroy
.. doxygenfunction:: refc_binary_from_data
.. doxygenfunction:: refc_binary_get_data
.. doxygenfunction:: refc_binary_increment_refcount
.. doxygenfunction:: refc_binary_total_size
.. doxygenfunction:: reg_type_c
.. doxygenfunction:: scan_iff
.. doxygenfunction:: scheduler_init_ready
.. doxygenfunction:: scheduler_kill
.. doxygenfunction:: scheduler_next
.. doxygenfunction:: scheduler_run
.. doxygenfunction:: scheduler_set_timeout
.. doxygenfunction:: scheduler_signal_message
.. doxygenfunction:: scheduler_stop_all
.. doxygenfunction:: scheduler_terminate
.. doxygenfunction:: scheduler_wait
.. doxygenfunction:: select_event_count_and_destroy_closed
.. doxygenfunction:: select_event_make_notification
.. doxygenfunction:: select_event_notify
.. doxygenfunction:: smp_condvar_create
.. doxygenfunction:: smp_condvar_destroy
.. doxygenfunction:: smp_condvar_signal
.. doxygenfunction:: smp_condvar_wait
.. doxygenfunction:: smp_get_online_processors
.. doxygenfunction:: smp_is_main_thread
.. doxygenfunction:: smp_mutex_create
.. doxygenfunction:: smp_mutex_destroy
.. doxygenfunction:: smp_mutex_lock
.. doxygenfunction:: smp_mutex_trylock
.. doxygenfunction:: smp_mutex_unlock
.. doxygenfunction:: smp_rwlock_create
.. doxygenfunction:: smp_rwlock_destroy
.. doxygenfunction:: smp_rwlock_rdlock
.. doxygenfunction:: smp_rwlock_unlock
.. doxygenfunction:: smp_rwlock_wrlock
.. doxygenfunction:: smp_scheduler_start
.. doxygenfunction:: smp_spinlock_init
.. doxygenfunction:: smp_spinlock_lock
.. doxygenfunction:: smp_spinlock_unlock
.. doxygenfunction:: socket_recv
.. doxygenfunction:: socket_send
.. doxygenfunction:: sys_create_port
.. doxygenfunction:: sys_free_platform
.. doxygenfunction:: sys_get_info
.. doxygenfunction:: sys_init_platform
.. doxygenfunction:: sys_listener_destroy
.. doxygenfunction:: sys_load_module
.. doxygenfunction:: sys_monotonic_time
.. doxygenfunction:: sys_monotonic_time_ms_to_u64
.. doxygenfunction:: sys_monotonic_time_u64
.. doxygenfunction:: sys_monotonic_time_u64_to_ms
.. doxygenfunction:: sys_poll_events
.. doxygenfunction:: sys_register_listener
.. doxygenfunction:: sys_register_select_event
.. doxygenfunction:: sys_signal
.. doxygenfunction:: sys_time
.. doxygenfunction:: sys_unregister_listener
.. doxygenfunction:: sys_unregister_select_event
.. doxygenfunction:: term_alloc_refc_binary
.. doxygenfunction:: term_alloc_sub_binary
.. doxygenfunction:: term_alloc_tuple
.. doxygenfunction:: term_binary_data
.. doxygenfunction:: term_binary_data_size_in_terms
.. doxygenfunction:: term_binary_size
.. doxygenfunction:: term_binary_heap_size
.. doxygenfunction:: term_binary_size_is_heap_binary
.. doxygenfunction:: term_boxed_size
.. doxygenfunction:: term_bs_insert_binary
.. doxygenfunction:: term_compare
.. doxygenfunction:: term_create_empty_binary
.. doxygenfunction:: term_create_uninitialized_binary
.. doxygenfunction:: term_display
.. doxygenfunction:: term_fprint
.. doxygenfunction:: term_from_atom_index
.. doxygenfunction:: term_from_int11
.. doxygenfunction:: term_from_int32
.. doxygenfunction:: term_from_int4
.. doxygenfunction:: term_from_literal_binary
.. doxygenfunction:: term_from_local_process_id
.. doxygenfunction:: term_from_ref_ticks
.. doxygenfunction:: term_from_resource
.. doxygenfunction:: term_funprint
.. doxygenfunction:: term_get_list_head
.. doxygenfunction:: term_get_list_ptr
.. doxygenfunction:: term_get_list_tail
.. doxygenfunction:: term_get_size_from_boxed_header
.. doxygenfunction:: term_get_tuple_element
.. doxygenfunction:: term_invalid_term
.. doxygenfunction:: term_is_atom
.. doxygenfunction:: term_is_binary
.. doxygenfunction:: term_is_boxed
.. doxygenfunction:: term_is_cp
.. doxygenfunction:: term_is_function
.. doxygenfunction:: term_is_integer
.. doxygenfunction:: term_is_invalid_term
.. doxygenfunction:: term_is_list
.. doxygenfunction:: term_is_movable_boxed
.. doxygenfunction:: term_is_nil
.. doxygenfunction:: term_is_nonempty_list
.. doxygenfunction:: term_is_otp_socket
.. doxygenfunction:: term_is_refc_binary
.. doxygenfunction:: term_is_sub_binary
.. doxygenfunction:: term_is_pid
.. doxygenfunction:: term_is_reference
.. doxygenfunction:: term_is_string
.. doxygenfunction:: term_is_tuple
.. doxygenfunction:: term_is_uint8
.. doxygenfunction:: term_list_from_list_ptr
.. doxygenfunction:: term_list_init_prepend
.. doxygenfunction:: term_list_length
.. doxygenfunction:: term_list_prepend
.. doxygenfunction:: term_maybe_create_sub_binary
.. doxygenfunction:: term_nil
.. doxygenfunction:: term_put_tuple_element
.. doxygenfunction:: term_refc_binary_ptr
.. doxygenfunction:: term_snprint
.. doxygenfunction:: term_sub_binary_heap_size
.. doxygenfunction:: term_to_atom_index
.. doxygenfunction:: term_to_const_term_ptr
.. doxygenfunction:: term_to_int32
.. doxygenfunction:: term_to_local_process_id
.. doxygenfunction:: term_to_otp_socket
.. doxygenfunction:: term_to_term_ptr
.. doxygenfunction:: term_to_uint8
.. doxygenfunction:: timer_list_next
