Exemplo n.º 1
0
static void dpram_ipc_rx_task(unsigned long data)
{
	struct dpram_link_device *dpld = (struct dpram_link_device *)data;
	struct link_device *ld = &dpld->ld;
	struct io_device *iod;
	struct dpram_rxb *rxb;
	unsigned qlen;
	int i;

	for (i = 0; i < dpld->max_ipc_dev; i++) {
		iod = dpld->iod[i];
		qlen = rxbq_size(&dpld->rxbq[i]);
		while (qlen > 0) {
			rxb = rxbq_get_data_rxb(&dpld->rxbq[i]);
			iod->recv(iod, ld, rxb->data, rxb->len);
			rxb_clear(rxb);
			qlen--;
		}
	}
}
Exemplo n.º 2
0
static void dpram_ipc_rx_task(unsigned long data)
{
	struct dpram_link_device *dpld = (struct dpram_link_device *)data;
	struct link_device *ld = &dpld->ld;
	struct io_device *iod;
	struct dpram_rxb *rxb;
	unsigned qlen;
	int i;

	for (i = 0; i < dpld->max_ipc_dev; i++) {
		if (i == IPC_RAW)
			iod = link_get_iod_with_format(ld, IPC_MULTI_RAW);
		else
			iod = link_get_iod_with_format(ld, i);

		qlen = rxbq_size(&dpld->rxbq[i]);
		while (qlen > 0) {
			rxb = rxbq_get_data_rxb(&dpld->rxbq[i]);
			iod->recv(iod, ld, rxb->data, rxb->len);
			rxb_clear(rxb);
			qlen--;
		}
	}
}