class DispatcherCoordinator
Defined at line 917 of file ../../src/devices/bin/driver_runtime/dispatcher.h
Coordinator for all dispatchers in a process.
Public Methods
void DispatcherCoordinator ()
We default to no threads, and start additional threads when blocking dispatchers are created.
Defined at line 920 of file ../../src/devices/bin/driver_runtime/dispatcher.h
bool AreAllDriversDestroyedLocked ()
Defined at line 961 of file ../../src/devices/bin/driver_runtime/dispatcher.h
Dispatcher::ThreadPool * default_thread_pool ()
Defined at line 979 of file ../../src/devices/bin/driver_runtime/dispatcher.h
Dispatcher::ThreadPool * GetOrCreateUnmanagedThreadPool ()
Returns the unmanaged thread pool. Creates it first if it doesn't exist.
Defined at line 982 of file ../../src/devices/bin/driver_runtime/dispatcher.h
void DestroyAllDispatchers ()
static
Defined at line 1690 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
void WaitUntilDispatchersIdle ()
static
Defined at line 1581 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
void WaitUntilDispatchersDestroyed ()
static
Defined at line 1595 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
zx_status_t TestingRun (zx::time deadline, bool once)
static
Defined at line 1605 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
zx_status_t TestingRunUntilIdle ()
static
Defined at line 1616 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
void TestingQuit ()
static
Defined at line 1627 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
zx_status_t TestingResetQuit ()
static
Defined at line 1636 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
zx_status_t ShutdownDispatchersAsync (const void * driver, fdf_env_driver_shutdown_observer_t * observer)
static
Defined at line 1647 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
zx_status_t TokenRegister (zx_handle_t token, fdf_dispatcher_t * dispatcher, fdf_token_t * handler)
Implementation of fdf_token_*.
Defined at line 1713 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
zx_status_t TokenReceive (zx_handle_t token, fdf_handle_t * handle)
static
Defined at line 1720 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
zx_status_t TokenTransfer (zx_handle_t token, fdf_handle_t channel)
static
Defined at line 1726 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
uint32_t GetThreadLimit (std::string_view scheduler_role)
Implementation of fdf_env_*.
Defined at line 1751 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
zx_status_t SetThreadLimit (std::string_view scheduler_role, uint32_t max_threads)
static
Defined at line 1764 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
uint32_t GetSchedulerRoleOpts (std::string_view scheduler_role)
static
Defined at line 1778 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
zx_status_t SetSchedulerRoleOpts (std::string_view scheduler_role, uint32_t opts)
static
Defined at line 1791 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
zx_duration_mono_t ScanThreadsForStalls ()
Defined at line 1804 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
void RegisterStallScanner (fdf_env_stall_scanner_t * stall_scanner)
Defined at line 1822 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
void TriggerStallScanner ()
Defined at line 1826 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
zx_status_t AddDispatcher (fbl::RefPtr<Dispatcher> dispatcher)
Returns ZX_OK if |dispatcher| was added successfully.
Returns ZX_ERR_BAD_STATE if the driver is currently shutting down.
Defined at line 1731 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
void NotifyDispatcherShutdown (driver_runtime::Dispatcher & dispatcher, fdf_dispatcher_shutdown_observer_t * dispatcher_shutdown_observer)
Notifies the dispatcher coordinator that a dispatcher has completed shutdown.
|dispatcher_shutdown_observer| is the observer to call.
Defined at line 1833 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
void RemoveDispatcher (Dispatcher & dispatcher)
Defined at line 1906 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
zx_status_t Start (uint32_t options)
Defined at line 1930 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
void EnvReset ()
static
Defined at line 1944 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
void Reset ()
Resets to 0 threads.
Must only be called when there are no outstanding dispatchers.
Must not be called from within a driver_runtime managed thread as that will result in a
deadlock.
Defined at line 1949 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
std::optional<Dispatcher::ThreadPool *> GetThreadPool (std::string_view scheduler_role)
Returns the thread pool for |scheduler_role| if it exists.
Defined at line 1962 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
zx::result<Dispatcher::ThreadPool *> GetOrCreateThreadPool (std::string_view scheduler_role)
Returns the thread pool for |scheduler_role|.
If the thread pool does not exists, creates the thread pool and starts the initial thread.
Defined at line 1972 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
void DestroyThreadPool (Dispatcher::ThreadPool * thread_pool)
This will schedule the thread pool to be deleted on a thread on the default thread pool.
Defined at line 1994 of file ../../src/devices/bin/driver_runtime/dispatcher.cc