Lines Matching refs:pollcb
471 apr_pollcb_t *pollcb = (apr_pollcb_t *) p_;
472 close(pollcb->fd);
476 static apr_status_t impl_pollcb_create(apr_pollcb_t *pollcb,
481 pollcb->fd = port_create();
483 if (pollcb->fd < 0) {
491 if ((flags = fcntl(pollcb->fd, F_GETFD)) == -1) {
493 close(pollcb->fd);
494 pollcb->fd = -1;
499 if (fcntl(pollcb->fd, F_SETFD, flags) == -1) {
501 close(pollcb->fd);
502 pollcb->fd = -1;
507 pollcb->pollset.port = apr_palloc(p, size * sizeof(port_event_t));
508 apr_pool_cleanup_register(p, pollcb, cb_cleanup, apr_pool_cleanup_null);
513 static apr_status_t impl_pollcb_add(apr_pollcb_t *pollcb,
525 ret = port_associate(pollcb->fd, PORT_SOURCE_FD, fd,
535 static apr_status_t impl_pollcb_remove(apr_pollcb_t *pollcb,
547 ret = port_dissociate(pollcb->fd, PORT_SOURCE_FD, fd);
556 static apr_status_t impl_pollcb_poll(apr_pollcb_t *pollcb,
565 rv = call_port_getn(pollcb->fd, pollcb->pollset.port, pollcb->nalloc,
570 pollfd = (apr_pollfd_t *)(pollcb->pollset.port[i].portev_user);
571 pollfd->rtnevents = get_revent(pollcb->pollset.port[i].portev_events);
577 rv = apr_pollcb_add(pollcb, pollfd);