intel / intel/confidential-computing.sgx.sdk

using std::mutex and std::cond_variable inside enclave

Open
#17 4 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C++
Stars
2
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Hi, I am trying to enable multithreading inside the enclave. What I do is to create a thread (by std::thread) outside the enclave and make an `ecall` into enclave. And inside the enclave, I use `std::mutex` and `std::condition_variable` to control the data access. But it turns out the program runs much slower than the single thread.

My question is whether sgx support `std::mutex` and `std::condition_variable`. Also, if the `TCSNum` is lower than the actual number of created threads for enclave, what will happen to these threads?

Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.