Skip to content

Commit

Permalink
[Fix] only linux support call_func_timeout
Browse files Browse the repository at this point in the history
Signed-off-by: csh <[email protected]>
  • Loading branch information
L-jasmine committed Sep 7, 2023
1 parent 1efcdb4 commit 857058a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/wasmedge-sys/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,8 @@ impl Executor {
/// # Errors
///
/// If fail to run the host function, then an error is returned.
#[cfg(target_os = "linux")]
#[cfg_attr(docsrs, doc(cfg(target_os = "linux")))]
pub fn call_func_timeout(
&self,
func: &Function,
Expand Down
2 changes: 2 additions & 0 deletions src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ impl Executor {
/// # Errors
///
/// If fail to run the host function, then an error is returned.
#[cfg(target_os = "linux")]
#[cfg_attr(docsrs, doc(cfg(target_os = "linux")))]
pub fn run_func_timeout(
&self,
func: &Func,
Expand Down
2 changes: 2 additions & 0 deletions src/externals/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ impl Func {
/// # Error
///
/// If fail to run the host function, then an error is returned.
#[cfg(target_os = "linux")]
#[cfg_attr(docsrs, doc(cfg(target_os = "linux")))]
pub fn run_timeout(
&self,
executor: &Executor,
Expand Down

0 comments on commit 857058a

Please sign in to comment.