diff options
| author | Dániel Buga <[email protected]> | 2024-11-26 23:54:21 +0100 |
|---|---|---|
| committer | Dániel Buga <[email protected]> | 2024-12-10 21:31:42 +0100 |
| commit | 5a5495aac43d75610735f2ca80fb6c8e8f31ed71 (patch) | |
| tree | 7a4336917894730692589359e9d1a285ec5a0a05 /embassy-executor/src/raw/util.rs | |
| parent | 406d377b7564d16e12b7fae4f42c0c709bf4f243 (diff) | |
Refactor integrated-timers
Diffstat (limited to 'embassy-executor/src/raw/util.rs')
| -rw-r--r-- | embassy-executor/src/raw/util.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/embassy-executor/src/raw/util.rs b/embassy-executor/src/raw/util.rs index c46085e45..e2633658a 100644 --- a/embassy-executor/src/raw/util.rs +++ b/embassy-executor/src/raw/util.rs | |||
| @@ -54,4 +54,9 @@ impl<T> SyncUnsafeCell<T> { | |||
| 54 | { | 54 | { |
| 55 | *self.value.get() | 55 | *self.value.get() |
| 56 | } | 56 | } |
| 57 | |||
| 58 | #[cfg(feature = "integrated-timers")] | ||
| 59 | pub unsafe fn replace(&self, value: T) -> T { | ||
| 60 | core::mem::replace(&mut *self.value.get(), value) | ||
| 61 | } | ||
| 57 | } | 62 | } |
