rem: input_wait(device);  if (device->interrupted) { *len = 0; return B_INTERRUPTED; }
add: *len = 0; return B_INTERRUPTED;
context: status_t hook_read(void *_data, off_t pos, void *buf, size_t *len){	viarhine_private *device = (viarhine_private*)_data;	ulong             buflen;	int               packet_len = 0;	unsigned int      entry;	char             *addr;	uint32            data_size;	uint32            desc_status;		buflen = *len;	atomic_add(&device->inrw, 1);ReturnInLoop:	write16(device->addr, CmdRxDemand | device->cmd);	while ((device->cur_rx == 0) && (!device->nonblocking))	{		input_wait(device);				if (device->interrupted)		{			*len = 0;			return B_INTERRUPTED;		}	}	if (device->cur_rx != 0)	{		device->cur_rx--;	}	else if (device->nonblocking)	{		*len = 0;		atomic_add(&device->inrw, 1);		return 0;	}		entry = 0;	while (device->rx_desc[entry].rx_status & DescOwn)	{		entry++;		entry %= RX_BUFFERS;	}	desc_status = device->rx_desc[entry].rx_status;	data_size   = (desc_status >> 16) - 4;		if (buflen < data_size)	{		data_size = buflen;	}		addr = &device->rx_buf[entry * BUFFER_SIZE];	if (!is_mine(device, addr))	{		device->rx_desc[entry].desc_length = 1536;		device->rx_desc[entry].rx_status   = DescOwn;		goto ReturnInLoop;	}#ifdef __VIARHINE_DEBUG__	debug_printf("hook_read: received (%u)(%u) (%02x:%02x:%02x:%02x:%02x:%02x)\n",			data_size,			device->cur_rx,			(unsigned char)addr[0],			(unsigned char)addr[1],			(unsigned char)addr[2],			(unsigned char)addr[3],			(unsigned char)addr[4],			(unsigned char)addr[5]);#endif	*len = data_size;	memcpy(buf, addr, data_size);	device->rx_desc[entry].desc_length = MAX_FRAME_SIZE;	device->rx_desc[entry].rx_status   = DescOwn;	atomic_add(&device->inrw, -1);	return B_OK;}