/* PROJECT: Alcyone Kernel * LICENSE: BSD Clause 3 * PURPOSE: Cache Controller:: MDL Handler * NT KERNEL: 5.11.9360 * COPYRIGHT: 2023-2029 Dibymartanda Samanta <> */ /* Iterator class for MDL*/ constexpr unsigned int MDL_READTYPE_DiskIoAttribution = 0; constexpr unsigned int OPTIONAL_IRP = 0; constexpr unsigned int MDL MAXIO_DISPATCH = 76; constexpr unsigned int NOPRIORITY = 0 ; constexpr unsigned int FLAG_UPDATE_READAHEAD = 0x20000;' ' class MDLIterator { public: MDLIterator(PMDL p) : ptr(p) {} // Prefix ++ operator MDLIterator& operator++() { if (ptr) { ptr = ptr->Next; } return *this; } // Postfix ++ operator MDLIterator operator++(int) { MDLIterator tmp(*this); operator++(); return tmp; } // Dereference operator PMDL operator*() const { return ptr; } // Equality operator bool operator==(const MDLIterator& rhs) const { return ptr == rhs.ptr; } // Inequality operator bool operator!=(const MDLIterator& rhs) const { return ptr != rhs.ptr; } private: PMDL ptr; }; /*Helper function to get the beginning of the MDL chain*/ MDLIterator begin(PMDL p) { return MDLIterator(p); } /* Helper function to get the end of the MDL chain*/ MDLIterator end(PMDL) { return MDLIterator(nullptr); }