Home
last modified time | relevance | path

Searched refs:Waker (Results 1 – 25 of 81) sorted by relevance

1234

/external/rust/crates/mio/src/sys/unix/
Dwaker.rs17 pub struct Waker { struct
21 impl Waker { impl
22 pub fn new(selector: &Selector, token: Token) -> io::Result<Waker> { in new() argument
27 Ok(Waker { fd: file }) in new()
59 pub use self::eventfd::Waker;
75 pub struct Waker { struct
80 impl Waker { implementation
81 pub fn new(selector: &Selector, token: Token) -> io::Result<Waker> { in new() argument
84 Ok(Waker { selector, token }) in new()
94 pub use self::kqueue::Waker; argument
[all …]
/external/rust/crates/futures-task/src/
Dwaker_ref.rs7 use core::task::{RawWaker, Waker};
15 waker: ManuallyDrop<Waker>,
22 pub fn new(waker: &'a Waker) -> Self { in new()
36 pub fn new_unowned(waker: ManuallyDrop<Waker>) -> Self { in new_unowned()
42 type Target = Waker;
45 fn deref(&self) -> &Waker { in deref() argument
64 ManuallyDrop::new(unsafe { Waker::from_raw(RawWaker::new(ptr, waker_vtable::<W>())) }); in waker_ref()
Dnoop_waker.rs4 use core::task::{RawWaker, RawWakerVTable, Waker};
29 pub fn noop_waker() -> Waker { in noop_waker()
31 unsafe { Waker::from_raw(noop_raw_waker()) } in noop_waker()
45 pub fn noop_waker_ref() -> &'static Waker { in noop_waker_ref()
52 unsafe { &*(&NOOP_WAKER_INSTANCE.0 as *const RawWaker as *const Waker) } in noop_waker_ref() constant
Dwaker.rs4 use core::task::{RawWaker, RawWakerVTable, Waker};
19 pub fn waker<W>(wake: Arc<W>) -> Waker in waker()
25 unsafe { Waker::from_raw(RawWaker::new(ptr, waker_vtable::<W>())) } in waker()
/external/rust/crates/mio/src/
Dwaker.rs78 pub struct Waker { struct
79 inner: sys::Waker, argument
82 impl Waker { impl
84 pub fn new(registry: &Registry, token: Token) -> io::Result<Waker> { in new() argument
87 sys::Waker::new(registry.selector(), token).map(|inner| Waker { inner }) in new()
/external/rust/crates/tokio/src/sync/task/
Datomic_waker.rs10 use std::task::Waker;
29 waker: UnsafeCell<Option<Waker>>,
171 pub(crate) fn register_by_ref(&self, waker: &Waker) { in register_by_ref() argument
313 pub(crate) fn take_waker(&self) -> Option<Waker> { in take_waker() argument
361 fn into_waker(self) -> Waker; in into_waker() argument
364 impl WakerRef for Waker { implementation
369 fn into_waker(self) -> Waker { in into_waker() argument
374 impl WakerRef for &Waker { implementation
379 fn into_waker(self) -> Waker { in into_waker() argument
/external/rust/crates/futures-test/src/task/
Dpanic_waker.rs2 use futures_core::task::{RawWaker, RawWakerVTable, Waker};
35 pub fn panic_waker() -> Waker { in panic_waker()
37 unsafe { Waker::from_raw(raw_panic_waker()) } in panic_waker()
52 pub fn panic_waker_ref() -> &'static Waker { in panic_waker_ref()
59 unsafe { &*(&PANIC_WAKER_INSTANCE.0 as *const RawWaker as *const Waker) } in panic_waker_ref() constant
/external/rust/crates/tokio/src/sync/tests/
Datomic_waker.rs4 use std::task::Waker;
12 impl AssertSend for Waker {} implementation
13 impl AssertSync for Waker {} implementation
44 use std::task::{RawWaker, RawWakerVTable, Waker}; in atomic_waker_panic_safe()
60 let panicking = unsafe { Waker::from_raw(RawWaker::new(ptr::null(), &PANICKING_VTABLE)) }; in atomic_waker_panic_safe()
61 let nonpanicking = unsafe { Waker::from_raw(RawWaker::new(ptr::null(), &NONPANICKING_VTABLE)) }; in atomic_waker_panic_safe()
/external/rust/crates/async-task/src/
Dheader.rs4 use core::task::Waker;
22 pub(crate) awaiter: UnsafeCell<Option<Waker>>,
36 pub(crate) fn notify(&self, current: Option<&Waker>) { in notify() argument
46 pub(crate) fn take(&self, current: Option<&Waker>) -> Option<Waker> { in take() argument
76 pub(crate) fn register(&self, waker: &Waker) { in register() argument
/external/rust/crates/mio/src/sys/windows/
Dwaker.rs10 pub struct Waker { struct
15 impl Waker { argument
16 pub fn new(selector: &Selector, token: Token) -> io::Result<Waker> { in new() argument
17 Ok(Waker { in new()
/external/rust/crates/tokio/src/util/
Dwake_list.rs3 use std::task::Waker;
8 inner: [MaybeUninit<Waker>; NUM_WAKERS],
31 pub(crate) fn push(&mut self, val: Waker) { in push() argument
50 let slice = ptr::slice_from_raw_parts_mut(self.inner.as_mut_ptr() as *mut Waker, self.curr); in drop()
Dwake.rs6 use std::task::{RawWaker, RawWakerVTable, Waker};
20 waker: ManuallyDrop<Waker>,
25 type Target = Waker;
27 fn deref(&self) -> &Waker { in deref() argument
36 let waker = unsafe { Waker::from_raw(RawWaker::new(ptr, waker_vtable::<W>())) }; in waker_ref()
/external/rust/crates/futures-core/src/task/__internal/
Datomic_waker.rs3 use core::task::Waker;
98 waker: UnsafeCell<Option<Waker>>,
210 impl AssertSync for Waker {} in new() implementation
265 pub fn register(&self, waker: &Waker) { in register() argument
372 pub fn take(&self) -> Option<Waker> { in take() argument
/external/rust/crates/tokio/src/runtime/task/
Dwaker.rs8 use std::task::{RawWaker, RawWakerVTable, Waker};
11 waker: ManuallyDrop<Waker>,
30 let waker = unsafe { ManuallyDrop::new(Waker::from_raw(raw_waker(*header))) }; in waker_ref()
39 type Target = Waker;
41 fn deref(&self) -> &Waker { in deref() argument
Dharness.rs11 use std::task::{Context, Poll, Waker};
130 pub(super) fn try_set_join_waker(&self, waker: &Waker) -> bool { in try_set_join_waker()
273 pub(super) fn try_read_output(self, dst: &mut Poll<super::Result<T::Output>>, waker: &Waker) { in try_read_output() argument
364 fn can_read_output(header: &Header, trailer: &Trailer, waker: &Waker) -> bool { in can_read_output()
411 waker: Waker, in set_join_waker() argument
/external/libchromeos-rs/src/sync/
Dblocking.rs21 thread_local!(static PER_THREAD_WAKER: Arc<Waker> = Arc::new(Waker(AtomicI32::new(WAITING))));
24 struct Waker(AtomicI32); struct
32 impl ArcWake for Waker { implementation
114 use std::task::{Context, Poll, Waker};
122 waker: Option<Waker>,
/external/rust/crates/mio/src/sys/shell/
Dwaker.rs6 pub struct Waker {} struct
8 impl Waker { impl
9 pub fn new(_: &Selector, _: Token) -> io::Result<Waker> { in new() argument
/external/crosvm/cros_async/src/blocking/sys/unix/
Dblock_on.rs24 thread_local!(static PER_THREAD_WAKER: Arc<Waker> = Arc::new(Waker(AtomicI32::new(WAITING))));
27 struct Waker(AtomicI32); struct
29 impl ArcWake for Waker { implementation
113 use std::task::Waker;
122 waker: Option<Waker>,
/external/rust/crates/tokio/src/runtime/
Ddefer.rs1 use std::task::Waker;
4 deferred: Vec<Waker>,
14 pub(crate) fn defer(&mut self, waker: Waker) { in defer() argument
/external/rust/crates/futures/tests/
Dtask_arc_wake.rs1 use futures::task::{self, ArcWake, Waker};
30 let w1: Waker = task::waker(some_w.clone()); in create_from_arc()
51 let w1: Waker = task::waker(some_w.clone()); in ref_wake_same()
71 let w1: Waker = task::waker(some_w.clone()); in proper_refcount_on_wake_panic()
/external/rust/crates/crossbeam-channel/src/
Dwaker.rs27 pub(crate) struct Waker { struct
35 impl Waker { implementation
39 Waker { in new()
166 impl Drop for Waker { implementation
179 inner: Mutex<Waker>,
190 inner: Mutex::new(Waker::new()), in new()
/external/crosvm/cros_async/src/
Dwaker.rs10 use std::task::Waker;
64 pub(crate) fn new_waker<W: WeakWake>(w: Weak<W>) -> Waker { in new_waker() argument
66 Waker::from_raw(RawWaker::new( in new_waker()
/external/rust/crates/futures-util/src/lock/
Dbilock.rs13 use futures_core::task::{Context, Poll, Waker};
100 let mut prev = Box::from_raw(n as *mut Waker); in poll_lock()
107 let me: Box<Waker> = waker.take().unwrap_or_else(|| Box::new(cx.waker().clone())); in poll_lock()
119 waker = Some(Box::from_raw(me as *mut Waker)); in poll_lock()
178 Box::from_raw(n as *mut Waker).wake(); in unlock()
/external/rust/crates/futures-executor/benches/
Dthread_notify.rs8 use futures::task::{Context, Poll, Waker};
76 let (tx, rx) = mpsc::sync_channel::<Waker>(10_000); in thread_yield_multi_thread()
80 tx: mpsc::SyncSender<Waker>, in thread_yield_multi_thread()
/external/rust/crates/tokio/src/sync/
Doneshot.rs134 use std::task::{Context, Poll, Waker};
400 struct Task(UnsafeCell<MaybeUninit<Waker>>);
409 F: FnOnce(&Waker) -> R, in with_task()
412 let waker: *const Waker = (*ptr).as_ptr(); in with_task() constant
419 let ptr: *mut Waker = (*ptr).as_mut_ptr(); in drop_task()
426 let ptr: *mut Waker = (*ptr).as_mut_ptr(); in set_task()
1120 self.rx_task.with_task(Waker::wake_by_ref); in complete()
1201 self.tx_task.with_task(Waker::wake_by_ref); in close()

1234