kernels/linux-2.4.0/drivers/block/xd.c
/* xd_waitport: waits until port & mask == flags or a timeout occurs. return 1 for a timeout */
waits until port & mask == flags or a timeout occurs. return 1 for a timeout
waits until port & mask == flags or a timeout occurs . return 1 for a timeout
static inline u_char xd_waitport (u_short port,u_char flags,u_char mask,u_long timeout)
{
	u_long expiry = jiffies + timeout;
	int success;
	xdc_busy = 1;
	while ((success = ((inb(port) & mask) != flags)) && time_before(jiffies, expiry)) {
		xd_timer.expires = jiffies;
		cli();
		add_timer(&xd_timer);
		sleep_on(&xdc_wait);
		del_timer(&xd_timer);
		sti();
	}
	xdc_busy = 0;
	return (success);
}
static inline u_char xd_waitport ( u_short port , u_char flags , u_char mask , u_long timeout ) { u_long expiry = jiffies + timeout ; int success ; xdc_busy = 1 ; while ( ( success = ( ( inb ( port ) & mask ) != flags ) ) && time_before ( jiffies , expiry ) ) { xd_timer . expires = jiffies ; cli ( ) ; add_timer ( & xd_timer ) ; sleep_on ( & xdc_wait ) ; del_timer ( & xd_timer ) ; sti ( ) ; } xdc_busy = 0 ; return ( success ) ; }
xd_waitport: waits until port & mask == flags or a timeout occurs.
xd_waitport : waits until port & mask == flags or a timeout occurs .