/* returns whether the deleted timer was pending (1) or not (0)  */
int del_virt_timer(struct vtimer_list *timer)
/* returns whether the deleted timer was pending (1) or not (0)  */
int del_virt_timer(struct vtimer_list *timer)
{
	unsigned long flags;
	struct vtimer_queue *vq;
	if (!vtimer_pending(timer))
		return 0;
	vq = &per_cpu(virt_cpu_timer, timer->cpu);
	spin_lock_irqsave(&vq->lock, flags);
	list_del_init(&timer->entry);
	spin_unlock_irqrestore(&vq->lock, flags);
	return 1;
}