set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(1); 
schedule_timeout_uninterruptible(1); 
int snd_seq_pool_done(pool_t *pool){	unsigned long flags;	snd_seq_event_cell_t *ptr;	int max_count = 5 * HZ;	snd_assert(pool != NULL, return -EINVAL);	/* wait for closing all threads */	spin_lock_irqsave(&pool->lock, flags);	pool->closing = 1;	spin_unlock_irqrestore(&pool->lock, flags);	if (waitqueue_active(&pool->output_sleep))		wake_up(&pool->output_sleep);	while (atomic_read(&pool->counter) > 0) {		if (max_count == 0) {			snd_printk(KERN_WARNING "snd_seq_pool_done timeout: %d cells remain\n", atomic_read(&pool->counter));			break;		}		set_current_state(TASK_UNINTERRUPTIBLE);		schedule_timeout(1);		max_count--;	}		/* release all resources */	spin_lock_irqsave(&pool->lock, flags);	ptr = pool->ptr;	pool->ptr = NULL;	pool->free = NULL;	pool->total_elements = 0;	spin_unlock_irqrestore(&pool->lock, flags);	vfree(ptr);	spin_lock_irqsave(&pool->lock, flags);	pool->closing = 0;	spin_unlock_irqrestore(&pool->lock, flags);	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/8433a509c0eb6bb1f33ce39c82c580b8901619ee/seq_memory.c/buggy/sound/core/seq/seq_memory.c