-
Notifications
You must be signed in to change notification settings - Fork 624
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Signed-off-by: Pavel Emelyanov <[email protected]>
- Loading branch information
Showing
5 changed files
with
49 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters