class ShareableProcessState

Defined at line 27 of file ../../zircon/kernel/object/include/object/shareable_process_state.h

This class is logically private to ProcessDispatcher.

|ShareableProcessState| contains all the state that can belong to more than one process.

This class is logically private to ProcessDispatcher.

The objects contained in this class have lifetimes that are decoupled from their lifecycle.

A ShareableProcessState is always constructed with a process count of 1, meaning that the creator

should issues a matching |DecrementShareCount| before the |ShareableProcessState| is destroyed.

Public Methods

void ShareableProcessState (const ShareableProcessState & )

Defined at line 29 of file ../../zircon/kernel/object/include/object/shareable_process_state.h

ShareableProcessState & operator= (const ShareableProcessState & )

Defined at line 30 of file ../../zircon/kernel/object/include/object/shareable_process_state.h

void ShareableProcessState ()

Defined at line 32 of file ../../zircon/kernel/object/include/object/shareable_process_state.h

void ~ShareableProcessState ()

Defined at line 33 of file ../../zircon/kernel/object/include/object/shareable_process_state.h

bool IncrementShareCount ()

Shares this state with a process, effectively incrementing the number of calls to

|RemoveFromProcess| that can be made before the shared resources are cleaned up.

Returns whether or not the share count was incremented successfully. Can fail if the process

state has been destroyed.

Defined at line 43 of file ../../zircon/kernel/object/include/object/shareable_process_state.h

void DecrementShareCount ()

Removes this state from a process. If the state is not shared with any other processes, the

shared resources are cleaned.

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

bool Initialize (vaddr_t aspace_base, vaddr_t aspace_size, const char * aspace_name, VmAspace::ShareOpt share_opt)

Initializes the shared state.

It is an error to call initialize on a shared state that has already been initialized, or one

that has been destroyed.

Defined at line 75 of file ../../zircon/kernel/object/include/object/shareable_process_state.h

uint64_t share_count ()

Defined at line 95 of file ../../zircon/kernel/object/include/object/shareable_process_state.h

HandleTable & handle_table ()

Defined at line 97 of file ../../zircon/kernel/object/include/object/shareable_process_state.h

const HandleTable & handle_table ()

Defined at line 98 of file ../../zircon/kernel/object/include/object/shareable_process_state.h

FutexContext & futex_context ()

Defined at line 100 of file ../../zircon/kernel/object/include/object/shareable_process_state.h

const FutexContext & futex_context ()

Defined at line 101 of file ../../zircon/kernel/object/include/object/shareable_process_state.h

VmAspace * aspace ()

Defined at line 103 of file ../../zircon/kernel/object/include/object/shareable_process_state.h

const VmAspace * aspace ()

Defined at line 104 of file ../../zircon/kernel/object/include/object/shareable_process_state.h