Lines Matching full:data
39 /* This thread sends all data using iovecs */
42 QIOChannelTest *data = opaque; in test_io_thread_writer() local
44 qio_channel_writev_all(data->src, in test_io_thread_writer()
45 data->inputv, in test_io_thread_writer()
46 data->niov, in test_io_thread_writer()
47 &data->writeerr); in test_io_thread_writer()
53 /* This thread receives all data using iovecs */
56 QIOChannelTest *data = opaque; in test_io_thread_reader() local
58 qio_channel_readv_all(data->dst, in test_io_thread_reader()
59 data->outputv, in test_io_thread_reader()
60 data->niov, in test_io_thread_reader()
61 &data->readerr); in test_io_thread_reader()
69 QIOChannelTest *data = g_new0(QIOChannelTest, 1); in qio_channel_test_new() local
74 /* We'll send 1 MB of data */ in qio_channel_test_new()
78 data->len = CHUNK_COUNT * CHUNK_LEN; in qio_channel_test_new()
79 data->input = g_new0(char, data->len); in qio_channel_test_new()
80 data->output = g_new0(gchar, data->len); in qio_channel_test_new()
83 for (i = 0; i < data->len; i += CHUNK_LEN) { in qio_channel_test_new()
84 memset(data->input + i, (i / CHUNK_LEN), CHUNK_LEN); in qio_channel_test_new()
87 /* We'll split the data across a bunch of IO vecs */ in qio_channel_test_new()
88 data->niov = CHUNK_COUNT; in qio_channel_test_new()
89 data->inputv = g_new0(struct iovec, data->niov); in qio_channel_test_new()
90 data->outputv = g_new0(struct iovec, data->niov); in qio_channel_test_new()
92 for (i = 0, offset = 0; i < data->niov; i++, offset += CHUNK_LEN) { in qio_channel_test_new()
93 data->inputv[i].iov_base = data->input + offset; in qio_channel_test_new()
94 data->outputv[i].iov_base = data->output + offset; in qio_channel_test_new()
95 data->inputv[i].iov_len = CHUNK_LEN; in qio_channel_test_new()
96 data->outputv[i].iov_len = CHUNK_LEN; in qio_channel_test_new()
99 return data; in qio_channel_test_new()