class MessageLoopFuchsia

Defined at line 42 of file ../../src/developer/debug/shared/message_loop_fuchsia.h

MessageLoop is a virtual class to enable tests to intercept watch messages.

See debug_agent/debug_agent_unittest.cc for an example.

Public Methods

void MessageLoopFuchsia ()

Defined at line 28 of file ../../src/developer/debug/shared/message_loop_fuchsia.cc

void ~MessageLoopFuchsia ()

Defined at line 30 of file ../../src/developer/debug/shared/message_loop_fuchsia.cc

void Cleanup ()

Defined at line 34 of file ../../src/developer/debug/shared/message_loop_fuchsia.cc

MessageLoopFuchsia * Current ()

Returns the current message loop or null if there isn't one.

Defined at line 56 of file ../../src/developer/debug/shared/message_loop_fuchsia.cc

async_dispatcher_t * dispatcher ()

Expose the underlying dispatcher from the async loop.

Defined at line 87 of file ../../src/developer/debug/shared/message_loop_fuchsia.h

WatchHandle WatchFD (WatchMode mode, int fd, FDWatcher watcher)

MessageLoop implementation.

Defined at line 108 of file ../../src/developer/debug/shared/message_loop_fuchsia.cc

const SignalHandlerMap & signal_handlers ()

Defined at line 118 of file ../../src/developer/debug/shared/message_loop_fuchsia.h

const ChannelExceptionHandlerMap & channel_exception_handlers ()

Defined at line 120 of file ../../src/developer/debug/shared/message_loop_fuchsia.h

zx_status_t WatchSocket (WatchMode mode, zx_handle_t socket_handle, SocketWatcher * watcher, WatchHandle * out)

Watches the given socket for read/write status. The watcher must outlive the returned

WatchHandle. Must only be called on the message loop thread.

The WatchHandle must not unregister from a callback. The handle might become both readable and

writable at the same time which will necessitate calling both callbacks. The code does not

expect the SocketWatcher to disappear in between these callbacks.

Defined at line 146 of file ../../src/developer/debug/shared/message_loop_fuchsia.cc

zx_status_t WatchChannel (zx_handle_t channel, ChannelWatcher * watcher, WatchHandle * out)

Similar to |WatchSocket| above, but watches a channel. There is no current usecase for anything

other than reading from channels, so there is no mode argument. The watcher must outlive the

returned WatchHandle, and this can only be called from the MessageLoop thread. The WatchHandle

may unregister from a callback, since we only care about when the channel becomes readable. If

this is modified in the future to watch for both readable and writable events, then the same

restriction as |WatchSocket| will apply.

Defined at line 172 of file ../../src/developer/debug/shared/message_loop_fuchsia.cc

zx_status_t WatchEventPair (zx_handle_t event_pair, EventPairWatcher * watcher, WatchHandle * out)

Defined at line 193 of file ../../src/developer/debug/shared/message_loop_fuchsia.cc

zx_status_t WatchProcessExceptions (WatchProcessConfig config, WatchHandle * out)

Defined at line 215 of file ../../src/developer/debug/shared/message_loop_fuchsia.cc

zx_status_t WatchJobExceptions (WatchJobConfig config, WatchHandle * out)

Defined at line 255 of file ../../src/developer/debug/shared/message_loop_fuchsia.cc

void QuitNow ()

Defined at line 356 of file ../../src/developer/debug/shared/message_loop_fuchsia.cc

Records

Friends

class ChannelExceptionHandler
class SignalHandler