2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 09:58:09 +00:00
criu/include/timerfd.h
Pavel Emelyanov d9a9d4c9b3 rst: Fix timerfd rst memory management
It's similar to previous patch with tcp mem -- no need to
realloc big arrays and then memcpy data between them. It's
enough just to walk timerfd objects at the very end.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-07-14 13:59:39 +03:00

40 lines
725 B
C

#ifndef __CR_TIMERFD_H__
#define __CR_TIMERFD_H__
#include <time.h>
#include <sys/ioctl.h>
#include "files.h"
struct pstree_item;
struct restore_timerfd {
int id;
int fd;
int clockid;
int settime_flags;
unsigned long ticks;
struct itimerspec val;
};
extern const struct fdtype_ops timerfd_dump_ops;
extern struct collect_image_info timerfd_cinfo;
int rst_timerfd_prep(void);
extern unsigned long rst_timerfd_cpos;
extern unsigned int rst_timerfd_nr;
extern int check_timerfd(void);
extern int is_timerfd_link(char *link);
#ifndef TFD_TIMER_ABSTIME
# define TFD_TIMER_ABSTIME (1 << 0)
#endif
#ifndef TFD_IOC_SET_TICKS
# define TFD_IOC_SET_TICKS _IOW('T', 0, u64)
#endif
#endif /* __CR_TIMERFD_H__ */