mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-20 01:54:28 +00:00
The unique id is 32 bit and consists only of the subid value. This is _really_ enough. The genid part is just a hint for the tree-search algirythm to avoid unneeded sys_kcmp calls. Plus, generate IDs for special files. This will make it easier to move the regfiles into into separate files (see the respective patch for details). Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
18 lines
393 B
C
18 lines
393 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 void fd_id_show_tree(void);
|
|
|
|
#endif /* FILE_IDS_H__ */
|