|
The Pedigree Project 0.1
|
#include <Readiness.h>
Inheritance diagram for ReadinessSource:
Collaboration diagram for ReadinessSource:Public Member Functions | |
| MUST_USE_RESULT bool | subscribeReadiness (ReadyMask interest, const SharedPointer< ReadinessObserver > &observer, ReadinessSubscription &subscription) |
| virtual ReadinessGenerations | readinessGenerations () |
Protected Member Functions | |
| void | notifyReadiness (ReadyMask mask) |
| void | closeReadiness (ReadyMask mask=ReadyInvalid|ReadyHangup) |
Private Member Functions | |
| ReadinessSource (const ReadinessSource &)=delete | |
| ReadinessSource & | operator= (const ReadinessSource &)=delete |
Private Attributes | |
| SharedPointer< ReadinessState > | m_ReadinessState |
A lifetime-safe registry for mask-filtered readiness notifications.
Definition at line 86 of file Readiness.h.
| ReadinessSource::ReadinessSource | ( | ) |
Definition at line 171 of file Readiness.cc.
|
virtual |
Definition at line 173 of file Readiness.cc.
|
protected |
Reject future subscriptions and issue one final terminal notification.
Definition at line 208 of file Readiness.cc.
Referenced by NetworkSyscalls::lastDescriptorClosed(), LwipSocketSyscalls::lastDescriptorClosed(), MqueueNetlinkSocket::lastDescriptorClosed(), and File::~File().
Here is the caller graph for this function:
|
protected |
Notify interested observers that the supplied predicates may have changed.
Definition at line 201 of file Readiness.cc.
Referenced by UnixSocketSyscalls::bind(), UnixSocketSyscalls::connect(), File::dataChanged(), InotifyInstance::eventsQueued(), LwipSocketSyscalls::netconnCallback(), UnixSocketSyscalls::pairWith(), EventFd::readValue(), and EventFd::writeValue().
Here is the caller graph for this function:
|
virtual |
Return source-serialized rising-edge sequences where available.
A source increments the corresponding sequence while holding the same lock which changes its readiness predicate. Consumers can then recover a drain/refill transition even if the two callback deliveries are reordered.
Reimplemented in EventFd, FanotifyQueue, InotifyInstance, MqueueNetlinkSocket, PosixMessageQueue, NetworkSyscalls, LwipSocketSyscalls, UnixSocketSyscalls, SignalFdView, TimerFd, UnixSocket, ConsoleFile, and Pipe.
Definition at line 177 of file Readiness.cc.
Referenced by EpollInstance::control().
Here is the caller graph for this function:| bool ReadinessSource::subscribeReadiness | ( | ReadyMask | interest, |
| const SharedPointer< ReadinessObserver > & | observer, | ||
| ReadinessSubscription & | subscription | ||
| ) |
Registers an observer. Callers must query the source after this returns to close the snapshot-versus-registration race; duplicate wakeups are valid.
Definition at line 181 of file Readiness.cc.
References SharedPointer< T >::get().
Referenced by EpollInstance::control().
Here is the caller graph for this function:
|
private |
Definition at line 119 of file Readiness.h.