|
The Pedigree Project 0.1
|
Inheritance diagram for UnixSocketSyscalls:
Collaboration diagram for UnixSocketSyscalls:Classes | |
| class | EndpointMutationGuard |
| class | EndpointMutationPairGuard |
| class | EndpointReadinessGuard |
Public Member Functions | |
| UnixSocketSyscalls (int domain, int type, int protocol) | |
| virtual bool | create () |
| Implementation-specific final socket creation logic. | |
| virtual int | connect (const struct sockaddr_storage *address, socklen_t addrlen) |
| virtual ssize_t | sendto_msg (const struct msghdr *msghdr, const SharedPointer< SocketRights > &rights) |
| virtual ssize_t | recvfrom_msg (struct msghdr *msghdr, SharedPointer< SocketRights > *rights) |
| virtual int | listen (int backlog) |
| virtual int | bind (const struct sockaddr_storage *address, socklen_t addrlen) |
| virtual int | accept (struct sockaddr_storage *address, socklen_t *addrlen, int flags, DescriptorLease *accepted=nullptr) |
| virtual int | shutdown (int how) |
| virtual int | getpeername (struct sockaddr_storage *address, socklen_t *address_len) |
| virtual int | getsockname (struct sockaddr_storage *address, socklen_t *address_len) |
| virtual int | setsockopt (int level, int optname, const void *optvalue, socklen_t optlen) |
| virtual int | getsockopt (int level, int optname, void *optvalue, socklen_t *optlen) |
| virtual bool | canPoll () const |
| virtual bool | poll (bool &read, bool &write, bool &error, Semaphore *waiter) |
| virtual void | unPoll (Semaphore *waiter) |
| virtual ReadyMask | queryReady (bool reading, bool writing) |
| ReadinessGenerations | readinessGenerations () override |
| virtual void | lastDescriptorClosed () |
| virtual bool | monitor (Thread *pThread, Event *pEvent) |
| virtual bool | unmonitor (Event *pEvent) |
| bool | pairWith (UnixSocketSyscalls *other) |
Public Member Functions inherited from NetworkSyscalls | |
| NetworkSyscalls (int domain, int type, int protocol) | |
| virtual ssize_t | sendto (const void *buffer, size_t bufferlen, int flags, const struct sockaddr_storage *address, socklen_t addrlen) |
| virtual ssize_t | recvfrom (void *buffer, size_t bufferlen, int flags, struct sockaddr_storage *address, socklen_t *addrlen) |
| MUST_USE_RESULT bool | addDescriptorOwner () |
| void | removeDescriptorOwner () |
| void | retainDescriptorLifetime (const SharedPointer< NetworkSyscalls > &lifetime) |
| void | associate (FileDescriptor *fd) |
| int | getDomain () const |
| int | getType () const |
| int | getProtocol () const |
| bool | isBlocking () const |
| virtual void | setBlocking (bool blocking) |
| int | takeReceiveError () |
| void | deferReceiveError (int error) |
Public Member Functions inherited from ReadinessSource | |
| MUST_USE_RESULT bool | subscribeReadiness (ReadyMask interest, const SharedPointer< ReadinessObserver > &observer, ReadinessSubscription &subscription) |
Private Member Functions | |
| NOT_COPYABLE_OR_ASSIGNABLE (UnixSocketSyscalls) | |
| void | registerSocket (UnixSocket *socket) |
| void | registerPeer (UnixSocket *socket, UnixSocket *peer, UnixSocket *listener=nullptr) |
| void | unregisterPeer (UnixSocket *socket, UnixSocket *peer) |
| void | notifyPeer (UnixSocket *socket, ReadyMask mask) |
| SharedPointer< UnixSocketGeneration > | acquireLocalEndpoint () const |
| void | replaceLocalEndpoint (UnixSocket *socket, bool tracked, const String *localPath=nullptr) |
| void | tryCompleteEndpointClose () |
| UnixSocket::SocketType | getSocketType () const |
Static Private Member Functions | |
| static void | unregisterSocket (UnixSocket *socket, List< UnixSocket * > &peers) |
| static void | notifySocket (UnixSocket *socket, ReadyMask mask) |
Static Private Attributes | |
| static Tree< UnixSocket *, UnixSocketSyscalls * > | m_SyscallObjects |
| static Tree< UnixSocket *, UnixSocket * > | m_Peers |
| static Tree< UnixSocket *, UnixSocket * > | m_PendingListeners |
| static Mutex | m_SyscallObjectsLock |
Friends | |
| class | UnixSocketGeneration |
| bool | runHostedUnixEndpointLifetimeRegression (Process *process) |
Additional Inherited Members | |
Protected Member Functions inherited from NetworkSyscalls | |
| ReadyMask | pendingReceiveReadiness () const |
| ReadinessGenerations | withReceiveErrorGeneration (ReadinessGenerations generations) const |
| bool | beginDescriptorClose () |
| bool | hasLastDescriptorClosed () const |
| SharedPointer< NetworkSyscalls > | acquireDescriptorLifetime () const |
| SharedPointer< NetworkSyscalls > | releaseDescriptorLifetime () |
Protected Member Functions inherited from ReadinessSource | |
| void | notifyReadiness (ReadyMask mask) |
| void | closeReadiness (ReadyMask mask=ReadyInvalid|ReadyHangup) |
Protected Attributes inherited from NetworkSyscalls | |
| int | m_Domain |
| int | m_Type |
| int | m_Protocol |
| Atomic< bool > | m_Blocking |
| Mutex | m_ReceiveErrorLock |
| int | m_ReceiveError = 0 |
| uint64_t | m_ReceiveErrorGeneration = 0 |
| OperationBarrier | m_ReadinessNotifications |
Definition at line 265 of file net-syscalls.h.
| UnixSocketSyscalls::UnixSocketSyscalls | ( | int | domain, |
| int | type, | ||
| int | protocol | ||
| ) |
Definition at line 2882 of file net-syscalls.cc.
|
virtual |
Definition at line 2897 of file net-syscalls.cc.
|
virtual |
Implements NetworkSyscalls.
Definition at line 3684 of file net-syscalls.cc.
|
private |
Definition at line 3022 of file net-syscalls.cc.
|
virtual |
Implements NetworkSyscalls.
Definition at line 3584 of file net-syscalls.cc.
References Directory::addEphemeralFile(), VFS::checkAccess(), String::endswith(), Directory::fromFile(), Process::getParent(), ProcessorBase::information(), VFS::instance(), File::isDirectory(), Filesystem::isReadOnly(), m_EndpointStateLock, ReadinessSource::notifyReadiness(), File::releaseVfsReference(), and VFS::trackFile().
|
virtual |
Reimplemented from NetworkSyscalls.
Definition at line 3884 of file net-syscalls.cc.
|
virtual |
Implements NetworkSyscalls.
Definition at line 3143 of file net-syscalls.cc.
References SharedPointer< T >::get(), File::isSocket(), m_EndpointStateLock, and ReadinessSource::notifyReadiness().
|
virtual |
Implementation-specific final socket creation logic.
Reimplemented from NetworkSyscalls.
Definition at line 3123 of file net-syscalls.cc.
References SharedPointer< T >::get().
|
virtual |
Implements NetworkSyscalls.
Definition at line 3753 of file net-syscalls.cc.
|
private |
Definition at line 4069 of file net-syscalls.cc.
|
virtual |
Implements NetworkSyscalls.
Definition at line 3780 of file net-syscalls.cc.
|
virtual |
Implements NetworkSyscalls.
Definition at line 3817 of file net-syscalls.cc.
|
virtual |
Retire the transport after the final descriptor alias closes.
Readiness users may retain this wrapper after the transport is gone, so implementations leave queryReady() returning a stable terminal state.
Reimplemented from NetworkSyscalls.
Definition at line 3049 of file net-syscalls.cc.
References NetworkSyscalls::beginDescriptorClose(), OperationBarrier::close(), Mutex::isOwnedByCurrentThread(), m_EndpointMutationLock, and NetworkSyscalls::m_ReadinessNotifications.
|
virtual |
Implements NetworkSyscalls.
Definition at line 3559 of file net-syscalls.cc.
References SharedPointer< T >::get().
Reimplemented from NetworkSyscalls.
Definition at line 3996 of file net-syscalls.cc.
|
private |
Definition at line 3010 of file net-syscalls.cc.
|
staticprivate |
Definition at line 2991 of file net-syscalls.cc.
| bool UnixSocketSyscalls::pairWith | ( | UnixSocketSyscalls * | other | ) |
Pair two UnixSocketSyscalls objects such that the referenced sockets directly communicate with each other.
Definition at line 4016 of file net-syscalls.cc.
References SharedPointer< T >::get(), m_EndpointMutationLock, m_EndpointStateLock, and ReadinessSource::notifyReadiness().
|
virtual |
Reimplemented from NetworkSyscalls.
Definition at line 3947 of file net-syscalls.cc.
|
virtual |
Return a level-triggered snapshot for the requested I/O directions.
Reimplemented from NetworkSyscalls.
Definition at line 3888 of file net-syscalls.cc.
References SharedPointer< T >::get(), and UnixSocket::select().
|
overridevirtual |
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 from NetworkSyscalls.
Definition at line 3936 of file net-syscalls.cc.
References SharedPointer< T >::get().
|
virtual |
Implements NetworkSyscalls.
Definition at line 3417 of file net-syscalls.cc.
|
private |
Definition at line 2918 of file net-syscalls.cc.
|
private |
Definition at line 2901 of file net-syscalls.cc.
|
private |
Definition at line 3027 of file net-syscalls.cc.
|
virtual |
Implements NetworkSyscalls.
Definition at line 3251 of file net-syscalls.cc.
References SharedPointer< T >::get(), File::isSocket(), m_EndpointStateLock, SharedPointer< T >::reset(), UnixSocket::sendDatagram(), and UnixSocket::sendStream().
|
virtual |
Implements NetworkSyscalls.
Definition at line 3800 of file net-syscalls.cc.
|
virtual |
|
private |
Definition at line 3069 of file net-syscalls.cc.
|
virtual |
Reimplemented from NetworkSyscalls.
Definition at line 4006 of file net-syscalls.cc.
|
virtual |
Reimplemented from NetworkSyscalls.
Definition at line 3989 of file net-syscalls.cc.
|
private |
Definition at line 2931 of file net-syscalls.cc.
|
staticprivate |
Definition at line 2946 of file net-syscalls.cc.
|
friend |
Definition at line 306 of file net-syscalls.h.
|
private |
Definition at line 381 of file net-syscalls.h.
|
private |
Definition at line 382 of file net-syscalls.h.
|
private |
Definition at line 378 of file net-syscalls.h.
|
private |
Definition at line 376 of file net-syscalls.h.
|
private |
Serializes bind/connect mutations without covering blocking I/O.
Definition at line 374 of file net-syscalls.h.
Referenced by lastDescriptorClosed(), and pairWith().
|
private |
Definition at line 375 of file net-syscalls.h.
|
private |
Definition at line 377 of file net-syscalls.h.
|
mutableprivate |
Serializes generation snapshots with endpoint and path publication.
Definition at line 372 of file net-syscalls.h.
Referenced by bind(), connect(), pairWith(), and sendto_msg().
|
private |
Definition at line 379 of file net-syscalls.h.
|
private |
Definition at line 384 of file net-syscalls.h.
|
staticprivate |
Definition at line 313 of file net-syscalls.h.
|
staticprivate |
Definition at line 314 of file net-syscalls.h.
|
private |
Definition at line 380 of file net-syscalls.h.
|
private |
Definition at line 385 of file net-syscalls.h.
|
staticprivate |
Definition at line 312 of file net-syscalls.h.
|
staticprivate |
Definition at line 315 of file net-syscalls.h.