[CRIU] [PATCH 08/12] posix-timer: Add restore structures
Pavel Emelyanov
xemul at parallels.com
Thu May 30 06:57:20 EDT 2013
On 05/30/2013 03:36 AM, Pavel Tikhomirov wrote:
>
> Signed-off-by: Pavel Tikhomirov <snorcht at gmail.com>
> ---
> include/restorer.h | 18 ++++++++++++++++++
> include/util.h | 1 +
> 2 files changed, 19 insertions(+)
>
> diff --git a/include/restorer.h b/include/restorer.h
> index caee41d..f3084ef 100644
> --- a/include/restorer.h
> +++ b/include/restorer.h
> @@ -16,6 +16,8 @@
>
> #include "vdso.h"
>
> +#include <time.h>
> +
> #include "protobuf/mm.pb-c.h"
> #include "protobuf/vma.pb-c.h"
> #include "protobuf/creds.pb-c.h"
> @@ -61,6 +63,19 @@ struct rst_sched_param {
> int prio;
> };
>
> +struct restore_posix_timer {
> + int it_id;
> + int clock_id;
> + int si_signo;
> + int it_sigev_notify;
> + union{
> + void * p;
> + long unsigned int i;
> + } sival_ptr;
> + struct itimerspec val;
> + int overrun;
This one doesn't differ (almost) from the proc_posix_timer. Merge them.
> +};
> +
> struct task_restore_core_args;
>
> /* Make sure it's pow2 in size */
> @@ -113,6 +128,9 @@ struct task_restore_core_args {
>
> struct itimerval itimers[3];
>
> + int timer_n;
> + struct restore_posix_timer *posix_timers;
> +
> CredsEntry creds;
> uint32_t cap_inh[CR_CAP_SIZE];
> uint32_t cap_prm[CR_CAP_SIZE];
> diff --git a/include/util.h b/include/util.h
> index e8d0231..d79d6e5 100644
> --- a/include/util.h
> +++ b/include/util.h
> @@ -274,5 +274,6 @@ static inline bool dir_dots(struct dirent *de)
> extern int read_fd_link(int lfd, char *buf, size_t size);
>
> #define USEC_PER_SEC 1000000L
> +#define NSEC_PER_SEC 1000000000L
>
> #endif /* __CR_UTIL_H__ */
>
More information about the CRIU
mailing list