mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
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>
This commit is contained in:
committed by
Andrei Vagin
parent
99e27b1dbc
commit
735ffc1d7e
19
compel/include/uapi/task-state.h
Normal file
19
compel/include/uapi/task-state.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#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__ */
|
Reference in New Issue
Block a user