コード例 #1
0
ファイル: visorchannel_funcs.c プロジェクト: MaxChina/linux
static BOOL
sig_do_data(VISORCHANNEL *channel, U32 queue,
	    SIGNAL_QUEUE_HEADER *sig_hdr, U32 slot, void *data, BOOL is_write)
{
	BOOL rc = FALSE;
	int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue,
						 sig_hdr, slot);
	if (is_write) {
		if (visor_memregion_write(channel->memregion,
					  signal_data_offset,
					  data, sig_hdr->SignalSize) < 0) {
			ERRDRV("visor_memregion_write of signal data failed: (status=%d)\n", rc);
			goto Away;
		}
	} else {
		if (visor_memregion_read(channel->memregion, signal_data_offset,
					 data, sig_hdr->SignalSize) < 0) {
			ERRDRV("visor_memregion_read of signal data failed: (status=%d)\n", rc);
			goto Away;
		}
	}
	rc = TRUE;
Away:
	return rc;
}
コード例 #2
0
ファイル: visorchannel_funcs.c プロジェクト: 383530895/linux
static BOOL
sig_do_data(VISORCHANNEL *channel, u32 queue,
	    struct signal_queue_header *sig_hdr, u32 slot, void *data,
	    BOOL is_write)
{
	BOOL rc = FALSE;
	int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue,
						 sig_hdr, slot);
	if (is_write) {
		if (visor_memregion_write(channel->memregion,
					  signal_data_offset,
					  data, sig_hdr->signal_size) < 0) {
			ERRDRV("visor_memregion_write of signal data failed: (status=%d)\n",
			       rc);
			goto cleanup;
		}
	} else {
		if (visor_memregion_read(channel->memregion, signal_data_offset,
					 data, sig_hdr->signal_size) < 0) {
			ERRDRV("visor_memregion_read of signal data failed: (status=%d)\n",
			       rc);
			goto cleanup;
		}
	}
	rc = TRUE;
cleanup:
	return rc;
}
コード例 #3
0
ファイル: visorchannel.c プロジェクト: asmalldev/linux
static int
sig_write_data(struct visorchannel *channel, u32 queue,
	       struct signal_queue_header *sig_hdr, u32 slot, void *data)
{
	int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue,
						 sig_hdr, slot);

	return visorchannel_write(channel, signal_data_offset,
				  data, sig_hdr->signal_size);
}