Intel® Software Guard Extensions (Intel® SGX)
Discussion board focused on hardware-based isolation and memory encryption to provide extended code protection in solutions.

Execute sleep() inside an enclave

Shredha_K_
Novice
1,508 Views

Hi,

Is it possible to execute a sleep() inside an enclave. 

Thanks in advance

0 Kudos
1 Solution
Anusha_K_Intel
Employee
1,508 Views

Hi,

Os calls(sleep()) cannot be used directly inside the enclave. We can use an OCALL to execute them.

View solution in original post

0 Kudos
4 Replies
Anusha_K_Intel
Employee
1,509 Views

Hi,

Os calls(sleep()) cannot be used directly inside the enclave. We can use an OCALL to execute them.

0 Kudos
Shredha_K_
Novice
1,508 Views

Thank you Anusha :)

0 Kudos
chaoshun_z_
Beginner
1,508 Views

OCALL may not safe since the sleep action will be performed by untrusted part​, so I implemented sleep by using "sgx_get_trusted_time"

 

 

 

0 Kudos
you_w_
New Contributor III
1,508 Views

I think If you really need this, just make an OCALL. But in this way the time sleep()ed may not be accurate.

0 Kudos
Reply