class AsyncEventPair
Defined at line 46 of file ../../src/sys/fuzzing/common/async-eventpair.h
This class wraps an eventpair to facilitate sending and asynchronously receiving signals with
additional error-checking.
Public Methods
void AsyncEventPair (ExecutorPtr executor)
Defined at line 14 of file ../../src/sys/fuzzing/common/async-eventpair.cc
zx::eventpair Create ()
Creates an event pair and returns one end via |out|. If this object was previously created or
linked, it is first reset.
Defined at line 16 of file ../../src/sys/fuzzing/common/async-eventpair.cc
void Pair (zx::eventpair && eventpair)
Takes one end of an event pair. If this object was previously paired, it is first reset.
Defined at line 23 of file ../../src/sys/fuzzing/common/async-eventpair.cc
bool IsConnected ()
Returns whether the eventpair is valid and hasn't seen a "peer closed" signal.
Defined at line 28 of file ../../src/sys/fuzzing/common/async-eventpair.cc
zx_status_t SignalSelf (zx_signals_t to_clear, zx_signals_t to_set)
Clears and sets user signals on to this end of the eventpair. Non-user signals are ignored.
Returns an error if not connected.
Defined at line 32 of file ../../src/sys/fuzzing/common/async-eventpair.cc
zx_status_t SignalPeer (zx_signals_t to_clear, zx_signals_t to_set)
Clears and sets user signals on to the other end of the eventpair. Non-user signals are
ignored. Returns an error if not connected.
Defined at line 43 of file ../../src/sys/fuzzing/common/async-eventpair.cc
void ~AsyncEventPair ()
Defined at line 49 of file ../../src/sys/fuzzing/common/async-eventpair.h
const zx::eventpair & eventpair ()
Defined at line 51 of file ../../src/sys/fuzzing/common/async-eventpair.h
const ExecutorPtr & executor ()
Defined at line 52 of file ../../src/sys/fuzzing/common/async-eventpair.h
zx_signals_t GetSignals (zx_signals_t signals)
Returns the subset of |signals| currently set on this end of the eventpair.
Defined at line 54 of file ../../src/sys/fuzzing/common/async-eventpair.cc
ZxPromise<zx_signals_t> WaitFor (zx_signals_t signals)
Promises to receive one or more of the requested |signals|. If the object receives a
|ZX_EVENTPAIR_PEER_CLOSED| signal, it will return a |ZX_ERR_PEER_CLOSED| error, even if that
signal was one of the requested |signals|.
Defined at line 71 of file ../../src/sys/fuzzing/common/async-eventpair.cc
void Reset ()
Resets the underlying eventpair.
Defined at line 100 of file ../../src/sys/fuzzing/common/async-eventpair.cc