Lines Matching refs:queued_fds
95 stream->queued_fds = NULL; in uv__stream_init()
573 if (server->queued_fds != NULL) { in uv_accept()
574 uv__stream_queued_fds_t* queued_fds; in uv_accept() local
576 queued_fds = server->queued_fds; in uv_accept()
579 server->accepted_fd = queued_fds->fds[0]; in uv_accept()
582 assert(queued_fds->offset > 0); in uv_accept()
583 if (--queued_fds->offset == 0) { in uv_accept()
584 uv__free(queued_fds); in uv_accept()
585 server->queued_fds = NULL; in uv_accept()
588 memmove(queued_fds->fds, in uv_accept()
589 queued_fds->fds + 1, in uv_accept()
590 queued_fds->offset * sizeof(*queued_fds->fds)); in uv_accept()
943 uv__stream_queued_fds_t* queued_fds; in uv__stream_queue_fd() local
946 queued_fds = stream->queued_fds; in uv__stream_queue_fd()
947 if (queued_fds == NULL) { in uv__stream_queue_fd()
949 queued_fds = uv__malloc((queue_size - 1) * sizeof(*queued_fds->fds) + in uv__stream_queue_fd()
950 sizeof(*queued_fds)); in uv__stream_queue_fd()
951 if (queued_fds == NULL) in uv__stream_queue_fd()
953 queued_fds->size = queue_size; in uv__stream_queue_fd()
954 queued_fds->offset = 0; in uv__stream_queue_fd()
955 stream->queued_fds = queued_fds; in uv__stream_queue_fd()
958 } else if (queued_fds->size == queued_fds->offset) { in uv__stream_queue_fd()
959 queue_size = queued_fds->size + 8; in uv__stream_queue_fd()
960 queued_fds = uv__realloc(queued_fds, in uv__stream_queue_fd()
961 (queue_size - 1) * sizeof(*queued_fds->fds) + in uv__stream_queue_fd()
962 sizeof(*queued_fds)); in uv__stream_queue_fd()
968 if (queued_fds == NULL) in uv__stream_queue_fd()
970 queued_fds->size = queue_size; in uv__stream_queue_fd()
971 stream->queued_fds = queued_fds; in uv__stream_queue_fd()
975 queued_fds->fds[queued_fds->offset++] = fd; in uv__stream_queue_fd()
1509 uv__stream_queued_fds_t* queued_fds; in uv__stream_close() local
1550 if (handle->queued_fds != NULL) { in uv__stream_close()
1551 queued_fds = handle->queued_fds; in uv__stream_close()
1552 for (i = 0; i < queued_fds->offset; i++) in uv__stream_close()
1553 uv__close(queued_fds->fds[i]); in uv__stream_close()
1554 uv__free(handle->queued_fds); in uv__stream_close()
1555 handle->queued_fds = NULL; in uv__stream_close()