File state.cpp

namespace wasm

SYSCALL NUMBERING

Have a look in the sysroot at include/bits/syscall.h to determine the system call numbering.

Functions

uint32_t getFaasmStateApi(NativeSymbol **nativeSymbols)
static int32_t __faasm_read_state_wrapper(wasm_exec_env_t exec_env, char *key, char *buffer, int32_t bufferLen)

Read state for the given key into the buffer provided.

Returns size of the state if buffer length is zero.

static int32_t __faasm_read_state_ptr_wrapper(wasm_exec_env_t exec_env, char *key, int32_t bufferLen)

Create a new memory region, read the state for the given key into it, then return a pointer to the new memory.

static void __faasm_write_state_wrapper(wasm_exec_env_t exec_env, char *key, char *buffer, int32_t bufferLen)

Writes the given data buffer to the state referenced by the given key.

static void __faasm_push_state_wrapper(wasm_exec_env_t exec_env, char *key)

Pushes the state for the given key

Variables

static NativeSymbol ns[] = {REG_NATIVE_FUNC(__faasm_read_state, "($$i)i"), REG_NATIVE_FUNC(__faasm_read_state_ptr, "($i)i"), REG_NATIVE_FUNC(__faasm_write_state, "($$i)"), REG_NATIVE_FUNC(__faasm_push_state, "($)"),}