class Executor

Defined at line 31 of file ../../zircon/kernel/object/include/object/executor.h

An Executor encapsulates the kernel state necessary to implement the Zircon system calls. It

depends on an interface from the kernel below it, presenting primitives like threads and wait

queues. It presents an interface to the system call implementations.

The goals of factoring this into such a layer include:

- The ability to test code in this layer separately from low-level kernel implementation details,

and from the syscall mechanism. This includes correctness as well as performance tests.

- Centralize resource management in order to make progress on things like not reporting

ZX_ERR_NO_MEMORY when creating a zx::event, or reporting bad handle faults.

TODO(kulakowski) The above comment is aspirational. So far, only the root job (and its observer)

is managed by the Executor. Other subsystems, like port arenas and handle arenas, are not yet

included. And e.g. tests are not yet written against the Executor.

Public Methods

void Init ()

Defined at line 9 of file ../../zircon/kernel/object/executor.cc

void StartRootJobObserver ()

Start watching the root job, taking a system-level action (such as restart) if

all its children are removed.

This must be called after the root job has at least one child process or child job.

Defined at line 19 of file ../../zircon/kernel/object/executor.cc

const fbl::RefPtr<JobDispatcher> & GetRootJobDispatcher ()

Defined at line 35 of file ../../zircon/kernel/object/include/object/executor.h

const Handle & GetRootJobHandle ()

Defined at line 37 of file ../../zircon/kernel/object/include/object/executor.h

fbl::RefPtr<EventDispatcher> GetMemPressureEvent (uint32_t kind)

Defined at line 39 of file ../../zircon/kernel/object/include/object/executor.h

MemoryWatchdog & GetMemoryWatchdog ()

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