template <typename T>
class KernelHandle
Defined at line 190 of file ../../zircon/kernel/object/include/object/handle.h
A minimal wrapper around a Dispatcher which is owned by the kernel.
Intended usage when creating a new Dispatcher object is:
1. Create a KernelHandle on the stack (cannot fail)
2. Move the RefPtr
<Dispatcher
> into the KernelHandle (cannot fail)
3. When ready to give the handle to a process, upgrade the KernelHandle
to a full HandleOwner via Handle::Make() (can fail)
This sequence ensures that the Dispatcher's on_zero_handles() method is
called even if errors occur during or before HandleOwner creation, which
is necessary to break circular references for some Dispatcher types.
This class is thread-unsafe and must be externally synchronized if used
across multiple threads.
Public Methods
void KernelHandle<T> ()
Defined at line 192 of file ../../zircon/kernel/object/include/object/handle.h
void KernelHandle<T> (fbl::RefPtr<T> dispatcher)
|dispatcher|'s handle count must be 0.
Defined at line 195 of file ../../zircon/kernel/object/include/object/handle.h
void ~KernelHandle<T> ()
Defined at line 199 of file ../../zircon/kernel/object/include/object/handle.h
void KernelHandle<T> (const KernelHandle<T> & )
Movable but not copyable since we own the underlying Dispatcher.
Defined at line 202 of file ../../zircon/kernel/object/include/object/handle.h
KernelHandle<T> & operator= (const KernelHandle<T> & )
Defined at line 203 of file ../../zircon/kernel/object/include/object/handle.h
template <typename U>
void KernelHandle<T> (KernelHandle<U> && other)
Defined at line 206 of file ../../zircon/kernel/object/include/object/handle.h
template <typename U>
KernelHandle<T> & operator= (KernelHandle<U> && other)
Defined at line 209 of file ../../zircon/kernel/object/include/object/handle.h
void reset ()
Defined at line 214 of file ../../zircon/kernel/object/include/object/handle.h
template <typename U>
void reset (fbl::RefPtr<U> dispatcher)
Defined at line 217 of file ../../zircon/kernel/object/include/object/handle.h
const fbl::RefPtr<T> & dispatcher ()
Defined at line 224 of file ../../zircon/kernel/object/include/object/handle.h
fbl::RefPtr<T> release ()
Defined at line 226 of file ../../zircon/kernel/object/include/object/handle.h
Friends
template <typename U>
class KernelHandle