2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 09:58:09 +00:00
criu/include/files.h
Pavel Emelyanov 6faac3a39e rst: Factor out vma fd fixup
Just make the fixup_vma_fds read and write vma images and
those called by it provide and fd for this.

Acked-by: Andrey Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-03-22 14:00:27 +04:00

46 lines
798 B
C

#ifndef FILES_H_
#define FILES_H_
#include "compiler.h"
#include "types.h"
#include "list.h"
#include "image.h"
enum fdinfo_states {
FD_STATE_PREP, /* Create unix sockets */
FD_STATE_CREATE, /* Create and send fd */
FD_STATE_RECV, /* Receive fd */
FD_STATE_MAX
};
struct fmap_fd {
struct fmap_fd *next;
unsigned long start;
int pid;
int fd;
};
struct fdinfo_desc {
u64 id;
u64 addr;
int pid;
u32 real_pid; /* futex */
u32 users; /* futex */
struct list_head list;
};
struct fdinfo_list_entry {
struct list_head list;
int fd;
int pid;
u32 real_pid;
};
extern int prepare_fds(int pid);
extern int prepare_fd_pid(int pid);
extern int prepare_shared_fdinfo(void);
extern int get_filemap_fd(int pid, struct vma_entry *vma_entry);
#endif /* FILES_H_ */