Ejemplo n.º 1
0
/*
 * The timer is automagically restarted, when interval != 0
 */
int it_real_fn(struct hrtimer *timer)
{
	struct signal_struct *sig =
	    container_of(timer, struct signal_struct, real_timer);

	send_group_sig_info(SIGALRM, SEND_SIG_PRIV, sig->tsk);

	if (sig->it_real_incr.tv64 != 0) {
		hrtimer_forward(timer, timer->base->softirq_time,
				sig->it_real_incr);
		return HRTIMER_RESTART;
	}
	return HRTIMER_NORESTART;
}
Ejemplo n.º 2
0
void it_real_fn(unsigned long __data)
{
   struct task_struct * p = (struct task_struct *) __data;
   unsigned long interval;

   send_group_sig_info(SIGALRM, SEND_SIG_PRIV, p);
   interval = p->it_real_incr;
   if (interval) {
      if (interval > (unsigned long) LONG_MAX)
         interval = LONG_MAX;
      p->real_timer.expires = jiffies + interval;
      add_timer(&p->real_timer);
   }
}