Lines Matching defs:ac

136 aio_context_init(struct aio_context *ac, int read_fd,
143 bzero(ac, sizeof(*ac));
144 ac->ac_read_fd = read_fd;
145 ac->ac_write_fd = write_fd;
146 ac->ac_buflen = buflen;
148 ac->ac_seed = random();
149 aio_fill_buffer(ac->ac_buffer, buflen, ac->ac_seed);
150 ATF_REQUIRE_MSG(aio_test_buffer(ac->ac_buffer, buflen,
151 ac->ac_seed) != 0, "aio_test_buffer: internal error");
260 aio_write_test(struct aio_context *ac, completion comp, struct sigevent *sev)
266 aio.aio_buf = ac->ac_buffer;
267 aio.aio_nbytes = ac->ac_buflen;
268 aio.aio_fildes = ac->ac_write_fd;
280 if (len != ac->ac_buflen)
289 aio_read_test(struct aio_context *ac, completion comp, struct sigevent *sev)
294 bzero(ac->ac_buffer, ac->ac_buflen);
296 aio.aio_buf = ac->ac_buffer;
297 aio.aio_nbytes = ac->ac_buflen;
298 aio.aio_fildes = ac->ac_read_fd;
310 ATF_REQUIRE_EQ_MSG(len, ac->ac_buflen,
313 if (aio_test_buffer(ac->ac_buffer, ac->ac_buflen, ac->ac_seed) == 0)
333 struct aio_context ac;
342 aio_context_init(&ac, fd, fd, FILE_LEN);
343 aio_write_test(&ac, comp, sev);
344 aio_read_test(&ac, comp, sev);
385 struct aio_context ac;
409 aio_context_init(&ac, read_fd, write_fd, FIFO_LEN);
410 aio_write_test(&ac, comp, sev);
411 aio_read_test(&ac, comp, sev);
451 struct aio_context ac;
460 aio_context_init(&ac, sockets[0], sockets[1], UNIX_SOCKETPAIR_LEN);
463 aio_write_test(&ac, comp, sev);
468 aio_read_test(&ac, comp, sev);
516 struct aio_context ac;
539 aio_context_init(&ac, read_fd, write_fd, PTY_LEN);
541 aio_write_test(&ac, comp, sev);
542 aio_read_test(&ac, comp, sev);
582 struct aio_context ac;
591 aio_context_init(&ac, pipes[0], pipes[1], PIPE_LEN);
592 aio_write_test(&ac, comp, sev);
593 aio_read_test(&ac, comp, sev);
665 struct aio_context ac;
699 aio_context_init(&ac, fd, fd, MD_LEN);
700 aio_write_test(&ac, comp, sev);
701 aio_read_test(&ac, comp, sev);