Typesļƒ

typedef const void *AtomString
typedef double avm_float_t
typedef int64_t avm_int64_t
typedef intptr_t avm_int_t
typedef uint64_t avm_uint64_t
typedef uintptr_t avm_uint_t
typedef void *(*avmpack_fold_fun)(void *accum, const void *section_ptr, uint32_t section_size, const void *beam_ptr, uint32_t flags, const char *section_name)

callback function for AVMPack section fold.

Instances of this function are supplied to the avmpack_fold function, in order to provide a callback mechanism for folding over the contents of the AVM binary.

Param accum:

The accumulator supplied by the application.

Param section_ptr:

a pointer to the start of the AVM section (including the module header).

Param section_size:

the size of the entire section (including the module header).

Param beam_ptr:

the start of the beam module portion of the section. This pointers starts immediately after the (aligned) header.

Param flags:

the section flags, as defined in the module header.

Param section_name:

the section name, as defined in the module header.

Return:

an accumulator, which will be supplied to the next call to this function, and eventually returned from the avmpack_fold function.

typedef struct CondVar CondVar
typedef int dreg_t
typedef term ERL_NIF_TERM

A term.

typedef struct ErlNifEnv ErlNifEnv

Opaque environment, passed to nifs.

typedef int ErlNifEvent

Selectable event.

typedef int32_t ErlNifPid

a pid

We currently only handle local pids.

typedef void ErlNifResourceDtor(ErlNifEnv *caller_env, void *obj)

Destructor callback.

typedef void ErlNifResourceStop(ErlNifEnv *caller_env, void *obj, ErlNifEvent event, int is_direct_call)

Select stop callback.

typedef struct ResourceType ErlNifResourceType

Opaque resource type.

typedef EventListener *(*event_handler_t)(GlobalContext *glb, EventListener *listener)

Event handlers (for ports)

The event handler is called from the scheduler thread but outside any process. It can send messages to processes using globalcontext_send_message function.

Result of this callback alters the list of handlers which is locked for writing when it is called. It can:

  • return listener, in which case the list is not modified

  • return NULL, in which case the entry is removed. The callback is responsible for freeing the listener.

  • return another listener, in which case the current listener is replaced by the other listener. The callback is responsible for freeing the previous listener if it is no longer needed.

Appending a listener is also possible by altering the list head.

This callback is defined for platforms using listeners.h header and can be ignored by others.

Param glb:

global context

Param listener:

the current listener

Return:

NULL if the current listener should be removed, listener if it should be kept or another listener if it should be replaced.

typedef struct EventListener EventListener

Event listener.

An event listener structure should be defined by the platform. Event listeners belong to the GlobalContext.listeners synchronized list.

typedef void (*func_ptr_t)(void)
typedef struct GlobalContext GlobalContext
typedef struct Heap Heap
typedef struct HeapFragment HeapFragment
typedef struct MailboxMessage MailboxMessage
typedef struct Message Message
typedef struct Module Module
typedef struct Mutex Mutex
typedef NativeHandlerResult (*native_handler_f)(Context *ctx)
typedef enum NativeHandlerResult NativeHandlerResult
typedef term (*NifImpl)(Context *ctx, int argc, term argv[])
int(* printer_function_t )(PrinterFun *fun, const char *fmt,...) PRINTF_FORMAT_ARGS(2
typedef struct PrinterFun PrinterFun
typedef struct RWLock RWLock
typedef struct SpinLock SpinLock
typedef uintptr_t term

A value of any data type, types bigger than a machine word will require some additional space on heap.

void() timer_list_callback_t (struct TimerListItem *)