kernels/linux-2.4.0/drivers/s390/char/con3215.c
/*
 * Function to conditionally start an IO. A read is started immediatly,
 * a write is only started immediatly if the flush flag is on or the
 * amount of data is bigger than RAW3215_MIN_WRITE. If a write is not
 * done immediatly a timer is started with a delay of RAW3215_TIMEOUT.
 */
Function to conditionally start an IO. A read is started immediatly,
a write is only started immediatly if the flush flag is on or the
amount of data is bigger than RAW3215_MIN_WRITE. If a write is not
done immediatly a timer is started with a delay of RAW3215_TIMEOUT.
Function to conditionally start an IO . A read is started immediatly a write is only started immediatly if the flush flag is on or the amount of data is bigger than RAW3215_MIN_WRITE . If a write is not done immediatly a timer is started with a delay of RAW3215_TIMEOUT .
extern inline void raw3215_try_io(raw3215_info *raw)
{
	if (!(raw->flags & RAW3215_ACTIVE))
		return;
	if (raw->queued_read != NULL)
		raw3215_start_io(raw);
	else if (raw->queued_write != NULL) {
		if (raw->count >= RAW3215_MIN_WRITE ||
		    (raw->flags & RAW3215_FLUSHING)) {
			raw3215_start_io(raw);
			if (raw->flags & RAW3215_TIMER_RUNS) {
				del_timer(&raw->timer);
				raw->flags &= ~RAW3215_TIMER_RUNS;
			}
		} else if (!(raw->flags & RAW3215_TIMER_RUNS)) {
			init_timer(&raw->timer);
			raw->timer.expires = RAW3215_TIMEOUT + jiffies;
			raw->timer.data = (unsigned long) raw;
			raw->timer.function = raw3215_timeout;
			add_timer(&raw->timer);
			raw->flags |= RAW3215_TIMER_RUNS;
		}
	}
}
extern inline void raw3215_try_io ( raw3215_info * raw ) { if ( ! ( raw -> flags & RAW3215_ACTIVE ) ) return ; if ( raw -> queued_read != NULL ) raw3215_start_io ( raw ) ; else if ( raw -> queued_write != NULL ) { if ( raw -> count >= RAW3215_MIN_WRITE || ( raw -> flags & RAW3215_FLUSHING ) ) { raw3215_start_io ( raw ) ; if ( raw -> flags & RAW3215_TIMER_RUNS ) { del_timer ( & raw -> timer ) ; raw -> flags &= ~ RAW3215_TIMER_RUNS ; } } else if ( ! ( raw -> flags & RAW3215_TIMER_RUNS ) ) { init_timer ( & raw -> timer ) ; raw -> timer . expires = RAW3215_TIMEOUT + jiffies ; raw -> timer . data = ( unsigned long ) raw ; raw -> timer . function = raw3215_timeout ; add_timer ( & raw -> timer ) ; raw -> flags |= RAW3215_TIMER_RUNS ; } } }
Function to conditionally start an IO.
Function to conditionally start an IO .
/* execute write requests bigger than minimum size */ /* delay small writes */