mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-05 08:45:49 +00:00
No magic here, just fetch info using getpriority and sched_getxxx calls. Good news is that the mentioned syscalls take pid as argument and do work with it, i.e. -- no need in parasite help here. Restore is splitted into prep -- copy sched bits from image on restorer args -- and the restore itself. It's done to avoid restoring tasks info with IDLE priority ;) To make restorer not-fail sched bits are validated for sanity on prep stage. Minimal sanity test is also there. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
65 lines
932 B
C
65 lines
932 B
C
/*
|
|
* Please add here type definitions if
|
|
* syscall prototypes need them.
|
|
*
|
|
* Anything else should go to plain type.h
|
|
*/
|
|
|
|
#ifndef SYSCALL_TYPES_H__
|
|
#define SYSCALL_TYPES_H__
|
|
|
|
#include <sys/time.h>
|
|
#include <arpa/inet.h>
|
|
#include <sched.h>
|
|
|
|
#include "types.h"
|
|
|
|
#ifndef CONFIG_X86_64
|
|
# error x86-32 bit mode not yet implemented
|
|
#endif
|
|
|
|
struct cap_header {
|
|
u32 version;
|
|
int pid;
|
|
};
|
|
|
|
struct cap_data {
|
|
u32 eff;
|
|
u32 prm;
|
|
u32 inh;
|
|
};
|
|
|
|
struct sockaddr;
|
|
struct msghdr;
|
|
struct rusage;
|
|
struct file_handle;
|
|
struct robust_list_head;
|
|
|
|
#ifndef F_GETFD
|
|
#define F_GETFD 1
|
|
#endif
|
|
|
|
#ifndef CLONE_NEWNS
|
|
#define CLONE_NEWNS 0x00020000
|
|
#endif
|
|
|
|
#ifndef CLONE_NEWPID
|
|
#define CLONE_NEWPID 0x20000000
|
|
#endif
|
|
|
|
#ifndef CLONE_NEWUTS
|
|
#define CLONE_NEWUTS 0x04000000
|
|
#endif
|
|
|
|
#ifndef CLONE_NEWIPC
|
|
#define CLONE_NEWIPC 0x08000000
|
|
#endif
|
|
|
|
#ifndef CLONE_NEWNET
|
|
#define CLONE_NEWNET 0x40000000
|
|
#endif
|
|
|
|
#define setns sys_setns
|
|
|
|
#endif /* SYSCALL_TYPES_H__ */
|