set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(1); 
schedule_timeout_interruptible(1); 
static void rs_wait_until_sent(struct tty_struct *tty, int timeout){	unsigned long orig_jiffies;	struct e100_serial *info = (struct e100_serial *)tty->driver_data;	unsigned long curr_time = jiffies;	unsigned long curr_time_usec = GET_JIFFIES_USEC();	long elapsed_usec =		(curr_time - info->last_tx_active) * (1000000/HZ) +		curr_time_usec - info->last_tx_active_usec;	/*	 * Check R_DMA_CHx_STATUS bit 0-6=number of available bytes in FIFO	 * R_DMA_CHx_HWSW bit 31-16=nbr of bytes left in DMA buffer (0=64k)	 */	orig_jiffies = jiffies;	while (info->xmit.head != info->xmit.tail || /* More in send queue */	       (*info->ostatusadr & 0x007f) ||  /* more in FIFO */	       (elapsed_usec < 2*info->char_time_usec)) {		set_current_state(TASK_INTERRUPTIBLE);		schedule_timeout(1);		if (signal_pending(current))			break;		if (timeout && time_after(jiffies, orig_jiffies + timeout))			break;		curr_time = jiffies;		curr_time_usec = GET_JIFFIES_USEC();		elapsed_usec =			(curr_time - info->last_tx_active) * (1000000/HZ) +			curr_time_usec - info->last_tx_active_usec;	}	set_current_state(TASK_RUNNING);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/3c76bc5bfda308aa42d5f42fde8dc1931e45e8a6/crisv10.c/buggy/drivers/serial/crisv10.c