rem: if ((!t) || (!hook) || (period < 0))
add: if (event == NULL || hook == NULL || period < 0)
context: status_t add_timer(timer *t, timer_hook hook, bigtime_t period, int32 flags){	bigtime_t sched_time;	bigtime_t curr_time = system_time();	int state;	int curr_cpu;		if ((!t) || (!hook) || (period < 0))		return B_BAD_VALUE;			sched_time = period;	if (flags != B_ONE_SHOT_ABSOLUTE_TIMER)		sched_time += curr_time;	if (sched_time == 0)		sched_time = 1;		t->entry.key = (int64)sched_time;	t->period = period;	t->hook = hook;	t->flags = flags;	state = disable_interrupts();	curr_cpu = smp_get_current_cpu();	acquire_spinlock(&timer_spinlock[curr_cpu]);	add_event_to_list(t, &events[curr_cpu]);	t->cpu = curr_cpu;	// if we were stuck at the head of the list, set the hardware timer	if (t == events[curr_cpu])		arch_timer_set_hardware_timer(sched_time - curr_time);	release_spinlock(&timer_spinlock[curr_cpu]);	restore_interrupts(state);	return B_OK;}