rem: if (foundit) release_spinlock(&timer_spinlock[cpu]);
context: bool cancel_timer(timer *event){	int state;	timer *last = NULL;	timer *e;	bool foundit = false;	int num_cpus = smp_get_num_cpus();	int cpu= 0;	int curr_cpu;//	if (event->sched_time == 0)//		return 0; // it's not scheduled	state = disable_interrupts();	curr_cpu = smp_get_current_cpu();	// walk through all of the cpu's timer queues	//	// We start by peeking our own queue, aiming for	// a cheap match. If this fails, we start harassing	// other cpus.	//	if (_local_timer_cancel_event(curr_cpu, event) < 0) {		for (cpu = 0; cpu < num_cpus; cpu++) {			if (cpu== curr_cpu) continue;			acquire_spinlock(&timer_spinlock[cpu]);			e = events[cpu];			while (e != NULL) {				if (e == event) {					// we found it					foundit = true;					if(e == events[cpu])						events[cpu] = (timer *)e->entry.next;					else						(timer *)last->entry.next = (timer *)e->entry.next;					e->entry.next = NULL;					// break out of the whole thing					goto done;				}				last = e;				e = (timer *)e->entry.next;			}			release_spinlock(&timer_spinlock[cpu]);		}	}done:	if (foundit)		release_spinlock(&timer_spinlock[cpu]);	restore_interrupts(state);	if (foundit && ((bigtime_t)event->entry.key < system_time()))		return true;	return false;}