Commit 10bfe8fa authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

maps007: check "stop" with "delta"

We don't need to wait if a stop signal has been received.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent ab4341a2
......@@ -83,7 +83,8 @@ int main(int argc, char **argv)
} else {
if (!futex_get(&shm->stop))
/* MAX_DELTA steps behind the parent */
while (atomic_get(&shm->delta) < MAX_DELTA);
while (atomic_get(&shm->delta) < MAX_DELTA &&
!futex_get(&shm->stop));
else if (atomic_get(&shm->delta) == 0)
break;
atomic_dec(&shm->delta);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment