[CRIU] [PATCH 4/5] timerfd: Implement c/r procedure, v2

Cyrill Gorcunov gorcunov at gmail.com
Fri Jun 27 08:42:25 PDT 2014


On Fri, Jun 27, 2014 at 07:38:11PM +0400, Pavel Emelyanov wrote:
> 
> > +static int timerfd_post_open(struct file_desc *d, int fd)
> > +{
> > +	struct timerfd_info *info = container_of(d, struct timerfd_info, d);
> > +	TimerfdEntry *tfe = info->tfe;
> > +	struct restore_timerfd *t;
> > +
> > +	rst_timerfd_nr++;
> > +	rst_timerfd = xrealloc(rst_timerfd, rst_timerfd_len());
> > +	if (!rst_timerfd)
> > +		return -ENOMEM;
> > +
> > +	t = &rst_timerfd[rst_timerfd_nr - 1];
> > +	t->fd				= fd;
> > +	t->ticks			= (unsigned long)tfe->ticks;
> > +	t->settime_flags		= tfe->settime_flags;
> > +	t->val.it_interval.tv_sec	= (time_t)tfe->isec;
> > +	t->val.it_interval.tv_nsec	= (long)tfe->insec;
> > +	t->val.it_value.tv_sec		= (time_t)tfe->vsec;
> > +	t->val.it_value.tv_nsec		= (long)tfe->vnsec;
> 
> How about TFD_TIMER_ABSTIME adjustments like in timerfd_open?

yes, thanks, will update

> > +static int timerfd_open(struct file_desc *d)
> > +{
> > +	struct itimerspec v = { };
> 
> This v is write-only variable here.

thanks, a leftover while tossing patches.


More information about the CRIU mailing list