2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-27 12:28:14 +00:00
criu/compel/include/uapi/task-state.h
Kir Kolyshkin 735ffc1d7e Sanitize TASK_ values
First, TASK_* defines provided by compel should be prefixed
with COMPEL_. The complication is, same constants are also used
by CRIU, some are even writted into images (meaning we should
not change their values).

One way to solve this would be to untie compel values from CRIU ones,
using some mapping between the two sets when needed (i.e. in calls to
compel_wait_task() and compel_resume_task()).

Fortunately, we can avoid implementing this mapping by separating
the ranges used by compel and criu. With this patch, compel is using
values in range 0x01..0x7f, and criu is reusing those, plus adding
more values in range 0x80..0xff for its own purposes.

Note tha the values that are used inside images are not changed
(as, luckily, they were all used by compel).

travis-ci: success for compel uapi cleanups (rev2)
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 09:36:05 +03:00

20 lines
456 B
C

#ifndef __COMPEL_UAPI_TASK_STATE_H__
#define __COMPEL_UAPI_TASK_STATE_H__
/*
* Task state, as returned by compel_wait_task()
* and used in arguments to compel_resume_task().
*/
enum __compel_task_state
{
COMPEL_TASK_ALIVE = 0x01,
COMPEL_TASK_DEAD = 0x02,
COMPEL_TASK_STOPPED = 0x03,
COMPEL_TASK_ZOMBIE = 0x06,
/* Don't ever change the above values, they are used by CRIU! */
COMPEL_TASK_MAX = 0x7f
};
#endif /* __COMPEL_UAPI_TASK_STATE_H__ */