mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 18:07:57 +00:00
The regfile's ID of a VMA is stored in its shmid field. And the file itself if sumped into regfiles.img image with 'special'-ly generated ID (i.e. -- just allocate a new unique one). Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
20 lines
434 B
C
20 lines
434 B
C
#ifndef FILE_IDS_H__
|
|
#define FILE_IDS_H__
|
|
|
|
#include "compiler.h"
|
|
#include "types.h"
|
|
#include "rbtree.h"
|
|
|
|
#define FD_ID_INVALID (-1U)
|
|
#define FD_PID_INVALID (-2U)
|
|
|
|
#define MAKE_FD_GENID(dev, ino, pos) \
|
|
(((u32)(dev) ^ (u32)(ino) ^ (u32)(pos)))
|
|
|
|
struct fdinfo_entry;
|
|
extern int fd_id_generate(pid_t pid, struct fdinfo_entry *fe);
|
|
extern u32 fd_id_generate_special(void);
|
|
extern void fd_id_show_tree(void);
|
|
|
|
#endif /* FILE_IDS_H__ */
|