class Handle

Defined at line 41 of file ../../zircon/kernel/object/include/object/handle.h

A Handle is how a specific process refers to a specific Dispatcher.

Public Methods

const fbl::RefPtr<Dispatcher> & dispatcher ()

Returns the Dispatcher to which this instance points.

Defined at line 44 of file ../../zircon/kernel/object/include/object/handle.h

zx_koid_t handle_table_id ()

Returns the handle table that owns this instance. Used to guarantee

that a process may only access handles in its own handle table.

Defined at line 48 of file ../../zircon/kernel/object/include/object/handle.h

uint32_t rights ()

Returns the |rights| parameter that was provided when this instance

was created.

Defined at line 55 of file ../../zircon/kernel/object/include/object/handle.h

bool HasRights (zx_rights_t desired)

Returns true if this handle has all of the desired rights bits set.

Defined at line 58 of file ../../zircon/kernel/object/include/object/handle.h

uint32_t base_value ()

Returns a value that can be decoded by Handle::FromU32() to derive a

pointer to this instance. ProcessDispatcher will XOR this with its

|handle_rand_| to create the zx_handle_t value that user space sees.

Defined at line 63 of file ../../zircon/kernel/object/include/object/handle.h

void set_handle_table_id (zx_koid_t pid)

Sets the value returned by handle_table_id().

Defined at line 80 of file ../../zircon/kernel/object/handle.cc

void Init ()

To be called once during bring up.

Defined at line 78 of file ../../zircon/kernel/object/handle.cc

Handle * FromU32 (uint32_t value)

Maps an integer obtained by Handle::base_value() back to a Handle.

Defined at line 203 of file ../../zircon/kernel/object/handle.cc

uint32_t Count (const fbl::RefPtr<const Dispatcher> & )

Get the number of outstanding handles for a given dispatcher.

Defined at line 214 of file ../../zircon/kernel/object/handle.cc

uint32_t Count (const Dispatcher & )

Get the number of outstanding handles for a given dispatcher.

Defined at line 218 of file ../../zircon/kernel/object/handle.cc

HandleOwner Make (fbl::RefPtr<Dispatcher> dispatcher, zx_rights_t rights)

Handle should never be created by anything other than Make or Dup.

Defined at line 127 of file ../../zircon/kernel/object/handle.cc

HandleOwner Make (KernelHandle<Dispatcher> kernel_handle, zx_rights_t rights)

Defined at line 137 of file ../../zircon/kernel/object/handle.cc

HandleOwner Dup (const Handle & source, zx_rights_t rights)

Defined at line 154 of file ../../zircon/kernel/object/handle.cc

Records

Friends

class HandleTableArena