wasm-micro-runtime/product-mini/platforms/linux-sgx/enclave-sample/Enclave/Enclave.edl
Wenyong Huang 6caa6b1d73
Support get return value for SGX os_printf/os_vprintf (#1387)
Fix the issue reported in #1359, change the implementation of
os_printf/os_vprintf for Intel SGX to get the actual bytes written.
2022-08-16 14:23:34 +08:00

25 lines
760 B
Plaintext

/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
enclave {
from "sgx_tstdc.edl" import *;
from "sgx_pthread.edl" import *;
from "sgx_wamr.edl" import *;
trusted {
/* define ECALLs here. */
public void ecall_handle_command(unsigned cmd,
[in, out, size=cmd_buf_size]uint8_t *cmd_buf,
unsigned cmd_buf_size);
public void ecall_iwasm_main([user_check]uint8_t *wasm_file_buf,
uint32_t wasm_file_size);
};
untrusted {
/* define OCALLs here. */
int ocall_print([in, string]const char* str);
};
};