class DispatcherCoordinator
Defined at line 890 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 893 of file ../../src/devices/bin/driver_runtime/dispatcher.h
bool AreAllDriversDestroyedLocked ()
Defined at line 932 of file ../../src/devices/bin/driver_runtime/dispatcher.h
Dispatcher::ThreadPool * default_thread_pool ()
Defined at line 948 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 951 of file ../../src/devices/bin/driver_runtime/dispatcher.h
void DestroyAllDispatchers ()
static
Defined at line 1674 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
void WaitUntilDispatchersIdle ()
static
Defined at line 1565 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
void WaitUntilDispatchersDestroyed ()
static
Defined at line 1579 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
zx_status_t TestingRun (zx::time deadline, bool once)
static
Defined at line 1589 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
zx_status_t TestingRunUntilIdle ()
static
Defined at line 1600 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
void TestingQuit ()
static
Defined at line 1611 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
zx_status_t TestingResetQuit ()
static
Defined at line 1620 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 1631 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 1697 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 1704 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 1710 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
uint32_t GetThreadLimit (std::string_view scheduler_role)
Implementation of fdf_env_*.
Defined at line 1735 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 1748 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
zx_duration_mono_t ScanThreadsForStalls ()
Defined at line 1761 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
void RegisterStallScanner (fdf_env_stall_scanner_t * stall_scanner)
Defined at line 1779 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
void TriggerStallScanner ()
Defined at line 1783 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 1715 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 1790 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
void RemoveDispatcher (Dispatcher & dispatcher)
Defined at line 1863 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
zx_status_t Start (uint32_t options)
Defined at line 1887 of file ../../src/devices/bin/driver_runtime/dispatcher.cc
void EnvReset ()
static
Defined at line 1901 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 1906 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 1919 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 1941 of file ../../src/devices/bin/driver_runtime/dispatcher.cc