Skip to content

Instantly share code, notes, and snippets.

@okuoku

okuoku/lin.h Secret

Created October 27, 2023 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save okuoku/188a1d552dfc07037f9dc3a1cb7713cc to your computer and use it in GitHub Desktop.
Save okuoku/188a1d552dfc07037f9dc3a1cb7713cc to your computer and use it in GitHub Desktop.
/* Automatically generated by wasm2c */
#ifndef LIN_H_GENERATED_
#define LIN_H_GENERATED_
#include "wasm-rt.h"
#include <stdint.h>
#ifndef WASM_RT_CORE_TYPES_DEFINED
#define WASM_RT_CORE_TYPES_DEFINED
typedef uint8_t u8;
typedef int8_t s8;
typedef uint16_t u16;
typedef int16_t s16;
typedef uint32_t u32;
typedef int32_t s32;
typedef uint64_t u64;
typedef int64_t s64;
typedef float f32;
typedef double f64;
#endif
#ifdef __cplusplus
extern "C" {
#endif
struct w2c_env;
typedef struct w2c_kernel {
struct w2c_env* w2c_env_instance;
u32 w2c_0x5F_stack_pointer;
wasm_rt_memory_t w2c_memory;
wasm_rt_funcref_table_t w2c_T0;
} w2c_kernel;
void wasm2c_kernel_instantiate(w2c_kernel*, struct w2c_env*);
void wasm2c_kernel_free(w2c_kernel*);
wasm_rt_func_type_t wasm2c_kernel_get_func_type(uint32_t param_count, uint32_t result_count, ...);
/* import: 'env' 'nccc_call64' */
void w2c_env_nccc_call64(struct w2c_env*, u32, u32);
/* export: 'memory' */
wasm_rt_memory_t* w2c_kernel_memory(w2c_kernel* instance);
/* export: 'taskmgmt' */
u32 w2c_kernel_taskmgmt(w2c_kernel*, u32, u32);
/* export: 'syscall' */
u32 w2c_kernel_syscall(w2c_kernel*, u32, u32, u32);
/* export: 'init' */
void w2c_kernel_init(w2c_kernel*);
#ifdef __cplusplus
}
#endif
#endif /* LIN_H_GENERATED_ */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment