set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(char_time); 
schedule_timeout_interruptible(char_time); 
static void mxser_wait_until_sent(struct tty_struct *tty, int timeout){	struct mxser_struct *info = (struct mxser_struct *) tty->driver_data;	unsigned long orig_jiffies, char_time;	int lsr;	if (info->type == PORT_UNKNOWN)		return;	if (info->xmit_fifo_size == 0)		return;		/* Just in case.... */	orig_jiffies = jiffies;	/*	 * Set the check interval to be 1/5 of the estimated time to	 * send a single character, and make it at least 1.  The check	 * interval should also be less than the timeout.	 *	 * Note: we have to use pretty tight timings here to satisfy	 * the NIST-PCTS.	 */	char_time = (info->timeout - HZ / 50) / info->xmit_fifo_size;	char_time = char_time / 5;	if (char_time == 0)		char_time = 1;	if (timeout && timeout < char_time)		char_time = timeout;	/*	 * If the transmitter hasn't cleared in twice the approximate	 * amount of time to send the entire FIFO, it probably won't	 * ever clear.  This assumes the UART isn't doing flow	 * control, which is currently the case.  Hence, if it ever	 * takes longer than info->timeout, this is probably due to a	 * UART bug of some kind.  So, we clamp the timeout parameter at	 * 2*info->timeout.	 */	if (!timeout || timeout > 2 * info->timeout)		timeout = 2 * info->timeout;#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT	printk(KERN_DEBUG "In rs_wait_until_sent(%d) check=%lu...", timeout, char_time);	printk("jiff=%lu...", jiffies);#endif	while (!((lsr = inb(info->base + UART_LSR)) & UART_LSR_TEMT)) {#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT		printk("lsr = %d (jiff=%lu)...", lsr, jiffies);#endif		set_current_state(TASK_INTERRUPTIBLE);		schedule_timeout(char_time);		if (signal_pending(current))			break;		if (timeout && time_after(jiffies, orig_jiffies + timeout))			break;	}	set_current_state(TASK_RUNNING);#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT	printk("lsr = %d (jiff=%lu)...done\n", lsr, jiffies);#endif}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/da4cd8dfe18ee901b880f94ca0fa79d5cc1cd0eb/mxser.c/clean/drivers/char/mxser.c