|
The Pedigree Project 0.1
|
#include <fanotify-queue.h>
Inheritance diagram for FanotifyQueue:
Collaboration diagram for FanotifyQueue:Public Types | |
| enum class | Take { Ready , Empty , Closed , TooSmall , Interrupted } |
Public Member Functions | |
| bool | valid () const |
| void | enqueue (const FanotifyRecord &) |
| Take | take (FanotifyRecord &, size_t capacity, bool canBlock) |
| void | close () |
| ReadyMask | queryReady () |
| ReadinessGenerations | readinessGenerations () override |
| int | queuedMetadataBytes () |
Public Member Functions inherited from ReadinessSource | |
| MUST_USE_RESULT bool | subscribeReadiness (ReadyMask interest, const SharedPointer< ReadinessObserver > &observer, ReadinessSubscription &subscription) |
Static Public Attributes | |
| static constexpr size_t | MaximumEvents = 256 |
| static constexpr size_t | MaximumRecordSize = 24 + 12 + 8 + 128 |
Private Attributes | |
| Mutex | m_Lock |
| ConditionVariable | m_Readers |
| UniqueArray< FanotifyRecord > | m_Records |
| size_t | m_Head = 0 |
| size_t | m_Count = 0 |
| bool | m_OverflowQueued = false |
| bool | m_Closed = false |
| ReadinessGenerations | m_Generations |
Additional Inherited Members | |
Protected Member Functions inherited from ReadinessSource | |
| void | notifyReadiness (ReadyMask mask) |
| void | closeReadiness (ReadyMask mask=ReadyInvalid|ReadyHangup) |
Preallocated event storage owns identity snapshots, without live File references.
Definition at line 25 of file fanotify-queue.h.
|
strong |
Definition at line 29 of file fanotify-queue.h.
| FanotifyQueue::FanotifyQueue | ( | ) |
Definition at line 59 of file fanotify-queue.cc.
|
override |
Definition at line 61 of file fanotify-queue.cc.
| void FanotifyQueue::close | ( | ) |
Definition at line 135 of file fanotify-queue.cc.
| void FanotifyQueue::enqueue | ( | const FanotifyRecord & | record | ) |
Definition at line 68 of file fanotify-queue.cc.
| ReadyMask FanotifyQueue::queryReady | ( | ) |
Definition at line 148 of file fanotify-queue.cc.
| int FanotifyQueue::queuedMetadataBytes | ( | ) |
Definition at line 156 of file fanotify-queue.cc.
|
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 ReadinessSource.
Definition at line 152 of file fanotify-queue.cc.
| FanotifyQueue::Take FanotifyQueue::take | ( | FanotifyRecord & | record, |
| size_t | capacity, | ||
| bool | canBlock | ||
| ) |
Definition at line 101 of file fanotify-queue.cc.
| bool FanotifyQueue::valid | ( | ) | const |
Definition at line 64 of file fanotify-queue.cc.
|
private |
Definition at line 48 of file fanotify-queue.h.
|
private |
Definition at line 46 of file fanotify-queue.h.
|
private |
Definition at line 49 of file fanotify-queue.h.
|
private |
Definition at line 45 of file fanotify-queue.h.
|
private |
Definition at line 42 of file fanotify-queue.h.
|
private |
Definition at line 47 of file fanotify-queue.h.
|
private |
Definition at line 43 of file fanotify-queue.h.
|
private |
Definition at line 44 of file fanotify-queue.h.
|
staticconstexpr |
Definition at line 27 of file fanotify-queue.h.
|
staticconstexpr |
Definition at line 28 of file fanotify-queue.h.