MCPcopy Create free account
hub / github.com/BowenFu/hspp / validateReadSet2

Function validateReadSet2

include/concurrent.h:818–864  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

816};
817
818inline auto validateReadSet2(typename ReadSet::Data rseLst, Integer readStamp, Integer myid)
819{
820 return io([=]() -> bool
821 {
822 if (rseLst.empty())
823 {
824 return true;
825 }
826 for (RSE rse: rseLst)
827 {
828 auto lock = rse.lock;
829 auto iowstamp = rse.writeStamp;
830 auto lockValue = (readLock | lock).run();
831 if ((isLocked | lockValue) && (lockValue != myid))
832 {
833 return false;
834 }
835 else
836 {
837 if (lockValue != myid)
838 {
839 if (lockValue > readStamp)
840 {
841 return false;
842 }
843 else
844 {
845 continue;
846 }
847 }
848 else
849 {
850 auto wstamp = (readIORef | iowstamp).run();
851 if (wstamp > readStamp)
852 {
853 return false;
854 }
855 else
856 {
857 continue;
858 }
859 }
860 }
861 }
862 return true;
863 });
864}
865
866constexpr auto validateReadSet = toGFunc<3> | [](auto ioReadSet, Integer readStamp, TId myId)
867{

Callers 1

concurrent.hFile · 0.85

Calls 2

ioFunction · 0.70
runMethod · 0.45

Tested by

no test coverage detected