/* Fair output driver allows a process to speak.  */
static void rs_fair_output(void)
/* Fair output driver allows a process to speak.  */
static void rs_fair_output(void)
{
	int left;
	unsigned long flags;
	struct m68k_serial *info = &m68k_soft[0];
	char c;
	if (info == 0) return;
	if (info->xmit_buf == 0) return;
	local_irq_save(flags);
	left = info->xmit_cnt;
	while (left != 0) {
		c = info->xmit_buf[info->xmit_tail];
		info->xmit_tail = (info->xmit_tail+1) & (SERIAL_XMIT_SIZE-1);
		info->xmit_cnt--;
		local_irq_restore(flags);
		rs_put_char(c);
		local_irq_save(flags);
		left = min(info->xmit_cnt, left-1);
	}
	udelay(5);
	local_irq_restore(flags);
	return;
}