diff options
author | Dylan Reid <dgreid@chromium.org> | 2020-04-29 22:29:51 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-05-05 03:35:10 +0000 |
commit | 4381d04dd99956a9d95fe8735b665cb9e8750fae (patch) | |
tree | 14d4dc8555ca0279ba80a0aed6a65e4ea1841176 /cros_async | |
parent | f60fb14a729002668688d2638750df041c9f1525 (diff) | |
download | crosvm-4381d04dd99956a9d95fe8735b665cb9e8750fae.tar crosvm-4381d04dd99956a9d95fe8735b665cb9e8750fae.tar.gz crosvm-4381d04dd99956a9d95fe8735b665cb9e8750fae.tar.bz2 crosvm-4381d04dd99956a9d95fe8735b665cb9e8750fae.tar.lz crosvm-4381d04dd99956a9d95fe8735b665cb9e8750fae.tar.xz crosvm-4381d04dd99956a9d95fe8735b665cb9e8750fae.tar.zst crosvm-4381d04dd99956a9d95fe8735b665cb9e8750fae.zip |
cros_async: implement waker_wake
Some futures-rs combinators call wake directly instead of using wake_by_ref. This was left out as on oversight because the initial executor code only used wake_by_ref. TEST=run tests with the combinators from futures-rs Change-Id: I8ac06dfd47d34eee493a5b1194d00ef9d7f6bc18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2173972 Tested-by: Dylan Reid <dgreid@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Dylan Reid <dgreid@chromium.org> Reviewed-by: Stephen Barber <smbarber@chromium.org> Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Diffstat (limited to 'cros_async')
-rw-r--r-- | cros_async/src/waker.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cros_async/src/waker.rs b/cros_async/src/waker.rs index f0dac0f..6d277ee 100644 --- a/cros_async/src/waker.rs +++ b/cros_async/src/waker.rs @@ -16,7 +16,9 @@ unsafe fn waker_drop(data_ptr: *const ()) { let _rc_bool = Rc::<AtomicBool>::from_raw(data_ptr as *const _); } -unsafe fn waker_wake(_: *const ()) {} +unsafe fn waker_wake(data_ptr: *const ()) { + waker_wake_by_ref(data_ptr) +} // Called when the bool should be set to true to wake the waker. unsafe fn waker_wake_by_ref(data_ptr: *const ()) { |