UsbDk: Make list enumeration interruptible

Functor may return false to stop enumeration

Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
This commit is contained in:
Pavel Gurvich 2014-02-27 14:15:42 +02:00 • committed by Dmitry Fleytman
parent 8539bed118
commit ce2c4e5ea7

View file

@ -128,7 +128,10 @@ public:
CLockedContext<TAccessStrategy> LockedContext(*this);
while (!IsListEmpty(&m_List))
{
Functor(Pop_LockLess());
if (!Functor(Pop_LockLess()))
{
return;
}
}
}
@ -160,7 +163,10 @@ private:
if (Predicate(Object))
{
Prepare(CurrEntry);
Functor(Object);
if (!Functor(Object))
{
return;
}
}
}
}