if(controller->irq) {
if (controller->irq)
cpci_stop_thread(void){	thread_finished = 1;	dbg("thread finish command given");	if(controller->irq) {		up(&event_semaphore);	}	dbg("wait for thread to exit");	down(&thread_exit);}