class HandleTable

Defined at line 46 of file ../../zircon/kernel/object/include/object/handle_table.h

A HandleTable is the data structure which stores the Handles

associated with one or more ProcessDispatchers.

Methods that require a ProcessDispatcher

&

|caller| will use to supplied

ProcessDispatcher as the target of ZX_POL_BAD_HANDLE job policy.

Public Methods

void HandleTable ()

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

void ~HandleTable ()

Defined at line 49 of file ../../zircon/kernel/object/include/object/handle_table.h

void HandleTable (const HandleTable & )

Defined at line 51 of file ../../zircon/kernel/object/include/object/handle_table.h

void HandleTable (HandleTable && )

Defined at line 52 of file ../../zircon/kernel/object/include/object/handle_table.h

HandleTable & operator= (const HandleTable & )

Defined at line 54 of file ../../zircon/kernel/object/include/object/handle_table.h

HandleTable & operator= (HandleTable && )

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

zx_handle_t MapHandleToValue (const HandleOwner & handle)

Maps a |handle| to an integer which can be given to usermode as a

handle value. Uses Handle->base_value() plus additional mixing.

Defined at line 59 of file ../../zircon/kernel/object/include/object/handle_table.h

uint32_t HandleCount ()

Returns the number of outstanding handles in this handle table.

Defined at line 64 of file ../../zircon/kernel/object/include/object/handle_table.h

void AddHandle (HandleOwner handle)

Adds |handle| to this handle table.

Defined at line 67 of file ../../zircon/kernel/object/include/object/handle_table.h

HandleOwner RemoveHandle (ProcessDispatcher & caller, zx_handle_t handle_value)

Removes |handle_value| from this handle table and returns ownership to the handle.

Defined at line 70 of file ../../zircon/kernel/object/include/object/handle_table.h

template <typename T>
zx_status_t GetDispatcherWithRights (ProcessDispatcher & caller, zx_handle_t handle_value, zx_rights_t desired_rights, fbl::RefPtr<T> * out_dispatcher)

Get the dispatcher corresponding to this handle value, after

checking that this handle has the desired rights.

WRONG_TYPE is returned before ACCESS_DENIED, because if the

wrong handle was passed, evaluating its rights does not have

much meaning and also this aids in debugging.

Defined at line 80 of file ../../zircon/kernel/object/include/object/handle_table.h

template <typename T>
zx_status_t ForEachHandle (T func)

Calls the provided

|zx_status_t func(zx_handle_t, zx_rights_t, const Dispatcher*)|

on every handle owned by the handle table. Stops if |func| returns an error,

returning the error value.

Defined at line 114 of file ../../zircon/kernel/object/include/object/handle_table.h

void Clean ()

Called when all the containing ProcessDispatchers have transitioned to the Dead state.

Defined at line 124 of file ../../zircon/kernel/object/include/object/handle_table.h

Lock<BrwLockPi> * get_lock ()

accessors

Defined at line 127 of file ../../zircon/kernel/object/include/object/handle_table.h