[CRIU] [PATCH] maps007: check "stop" with "delta"
Pavel Emelyanov
xemul at parallels.com
Thu Jan 30 03:10:14 PST 2014
On 01/29/2014 11:38 PM, Andrey Vagin wrote:
> We don't need to wait if a stop signal has been received.
>
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
> test/zdtm/live/transition/maps007.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/test/zdtm/live/transition/maps007.c b/test/zdtm/live/transition/maps007.c
> index 94122f0..93f849c 100644
> --- a/test/zdtm/live/transition/maps007.c
> +++ b/test/zdtm/live/transition/maps007.c
> @@ -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);
>
applied
More information about the CRIU
mailing list