| 91 | }; |
| 92 | |
| 93 | void bpf_buffer::set_callback_params( |
| 94 | WasmEdge_ExecutorContext *executor, |
| 95 | const WasmEdge_ModuleInstanceContext *module_instance, uint32_t sample_func, |
| 96 | void *data, size_t max_size, uint32_t ctx, uint32_t buf_ptr) { |
| 97 | wasm_executor = executor; |
| 98 | wasm_module_instance = module_instance; |
| 99 | wasm_sample_function = sample_func; |
| 100 | poll_data = data; |
| 101 | max_poll_size = max_size; |
| 102 | wasm_ctx = ctx; |
| 103 | wasm_buf_ptr = buf_ptr; |
| 104 | } |
| 105 | |
| 106 | bool bpf_buffer::is_valid() const { |
| 107 | auto module_inst = wasm_module_instance; |