Lines Matching refs:cb
53 struct aiocb *cb;
69 struct aiocb *cb;
166 struct aiocb *cb = at->cb;
167 struct sigevent sev = cb->aio_sigevent;
177 cb->__ret = at->ret;
180 if (a_swap(&cb->__err, at->err) != EINPROGRESS)
181 __wake(&cb->__err, -1, 1);
219 struct aiocb *cb = args->cb;
220 int fd = cb->aio_fildes;
222 void *buf = (void *)cb->aio_buf;
223 size_t len = cb->aio_nbytes;
224 off_t off = cb->aio_offset;
238 at.cb = cb;
285 static int submit(struct aiocb *cb, int op)
291 struct aio_queue *q = __aio_get_queue(cb->aio_fildes, 1);
292 struct aio_args args = { .cb = cb, .op = op, .q = q };
297 cb->__ret = -1;
298 cb->__err = errno;
304 if (cb->aio_sigevent.sigev_notify == SIGEV_THREAD) {
305 if (cb->aio_sigevent.sigev_notify_attributes)
306 a = *cb->aio_sigevent.sigev_notify_attributes;
317 cb->__err = EINPROGRESS;
321 cb->__err = errno = EAGAIN;
322 cb->__ret = ret = -1;
333 int aio_read(struct aiocb *cb)
336 return submit(cb, LIO_READ);
339 int aio_write(struct aiocb *cb)
342 return submit(cb, LIO_WRITE);
345 int aio_fsync(int op, struct aiocb *cb)
352 return submit(cb, op);
355 ssize_t aio_return(struct aiocb *cb)
358 return cb->__ret;
361 int aio_error(const struct aiocb *cb)
365 return cb->__err & 0x7fffffff;
368 int aio_cancel(int fd, struct aiocb *cb)
377 if (cb && fd != cb->aio_fildes) {
392 if (cb && cb != p->cb) continue;