about summary refs log tree commit diff
path: root/src/libstd/sys/sgx/thread.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2020-07-16 17:08:56 -0700
committerGitHub <noreply@github.com>2020-07-16 17:08:56 -0700
commit41d956bf632fbc658f21a4195344fe79b685cde9 (patch)
tree24b2fbdfb120b84814d6b1bd996e6dba940fd15e /src/libstd/sys/sgx/thread.rs
parentec93d566b3ef29d5b97acca520558b5b05104f20 (diff)
parent85c25aed510ce599504b172f7c7bef280e91637b (diff)
downloadrust-41d956bf632fbc658f21a4195344fe79b685cde9.tar.gz
rust-41d956bf632fbc658f21a4195344fe79b685cde9.zip
Rollup merge of #73269 - mzohreva:mz/sgx-wait-timeout, r=jethrogb
Enable some timeouts in SGX platform

This would partially resolve https://github.com/fortanix/rust-sgx/issues/31

cc @jethrogb and @Goirad
Diffstat (limited to 'src/libstd/sys/sgx/thread.rs')
-rw-r--r--src/libstd/sys/sgx/thread.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys/sgx/thread.rs b/src/libstd/sys/sgx/thread.rs
index 9b515eb82de..5895f70436e 100644
--- a/src/libstd/sys/sgx/thread.rs
+++ b/src/libstd/sys/sgx/thread.rs
@@ -73,8 +73,8 @@ impl Thread {
         // FIXME: could store this pointer in TLS somewhere
     }
 
-    pub fn sleep(_dur: Duration) {
-        rtabort!("can't sleep"); // FIXME
+    pub fn sleep(dur: Duration) {
+        usercalls::wait_timeout(0, dur, || true);
     }
 
     pub fn join(self) {