We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03301f2 commit 2dc6ba2Copy full SHA for 2dc6ba2
library/std/src/sys/xous/thread_parking.rs
@@ -1,4 +1,4 @@
1
-use crate::os::xous::ffi::blocking_scalar;
+use crate::os::xous::ffi::{blocking_scalar, scalar};
2
use crate::os::xous::services::{ticktimer_server, TicktimerScalar};
3
use crate::pin::Pin;
4
use crate::ptr;
@@ -86,3 +86,9 @@ impl Parker {
86
}
87
88
89
+
90
+impl Drop for Parker {
91
+ fn drop(&mut self) {
92
+ scalar(ticktimer_server(), TicktimerScalar::FreeCondition(self.index()).into()).ok();
93
+ }
94
+}
0 commit comments