Skip to content

Commit

Permalink
Fix for musl target in pthread_kill
Browse files Browse the repository at this point in the history
  • Loading branch information
Max K committed Jul 5, 2023
1 parent 51ef300 commit 8226083
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion intel-sgx/enclave-runner/src/usercalls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -995,8 +995,12 @@ impl EnclaveState {
EnclaveState::syscall_loop(enclave.clone(), io_queue_receive, io_queue_send, work_sender);

for handler in join_handlers {
#[cfg(unix)]
#[cfg(any(target_env = "musl", target_env = "ohos"))]
unsafe { libc::pthread_kill(handler.as_pthread_t() as *mut c_void, signal::SIGUSR1 as _); }

#[cfg(target_env = "gnu")]
unsafe { libc::pthread_kill(handler.as_pthread_t(), signal::SIGUSR1 as _); }

let _ = handler.join();
}
return main_result;
Expand Down

0 comments on commit 8226083

Please sign in to comment.