Lines Matching refs:dep_stream
155 static int stream_obq_push(nghttp2_stream *dep_stream, nghttp2_stream *stream) in stream_obq_push() argument
159 for (; dep_stream && !stream->queued; in stream_obq_push()
160 stream = dep_stream, dep_stream = dep_stream->dep_prev) { in stream_obq_push()
161 stream_next_cycle(stream, dep_stream->descendant_last_cycle); in stream_obq_push()
162 stream->seq = dep_stream->descendant_next_seq++; in stream_obq_push()
168 dep_stream->stream_id); in stream_obq_push()
170 rv = nghttp2_pq_push(&dep_stream->obq, &stream->pq_entry); in stream_obq_push()
187 nghttp2_stream *dep_stream; in stream_obq_remove() local
189 dep_stream = stream->dep_prev; in stream_obq_remove()
195 for (; dep_stream; stream = dep_stream, dep_stream = dep_stream->dep_prev) { in stream_obq_remove()
197 dep_stream->stream_id); in stream_obq_remove()
199 nghttp2_pq_remove(&dep_stream->obq, &stream->pq_entry); in stream_obq_remove()
209 if (stream_subtree_active(dep_stream)) { in stream_obq_remove()
239 nghttp2_stream *dep_stream; in nghttp2_stream_reschedule() local
243 dep_stream = stream->dep_prev; in nghttp2_stream_reschedule()
245 for (; dep_stream; stream = dep_stream, dep_stream = dep_stream->dep_prev) { in nghttp2_stream_reschedule()
246 nghttp2_pq_remove(&dep_stream->obq, &stream->pq_entry); in nghttp2_stream_reschedule()
248 stream_next_cycle(stream, dep_stream->descendant_last_cycle); in nghttp2_stream_reschedule()
249 stream->seq = dep_stream->descendant_next_seq++; in nghttp2_stream_reschedule()
251 nghttp2_pq_push(&dep_stream->obq, &stream->pq_entry); in nghttp2_stream_reschedule()
256 dep_stream->last_writelen = stream->last_writelen; in nghttp2_stream_reschedule()
262 nghttp2_stream *dep_stream; in nghttp2_stream_change_weight() local
274 dep_stream = stream->dep_prev; in nghttp2_stream_change_weight()
276 if (!dep_stream) { in nghttp2_stream_change_weight()
280 dep_stream->sum_dep_weight += weight - old_weight; in nghttp2_stream_change_weight()
286 nghttp2_pq_remove(&dep_stream->obq, &stream->pq_entry); in nghttp2_stream_change_weight()
304 if (stream->cycle < dep_stream->descendant_last_cycle && in nghttp2_stream_change_weight()
305 (dep_stream->descendant_last_cycle - stream->cycle) <= in nghttp2_stream_change_weight()
307 stream->cycle = dep_stream->descendant_last_cycle; in nghttp2_stream_change_weight()
312 nghttp2_pq_push(&dep_stream->obq, &stream->pq_entry); in nghttp2_stream_change_weight()
631 int nghttp2_stream_dep_insert(nghttp2_stream *dep_stream, in nghttp2_stream_dep_insert() argument
637 DEBUGF("stream: dep_insert dep_stream(%p)=%d, stream(%p)=%d\n", dep_stream, in nghttp2_stream_dep_insert()
638 dep_stream->stream_id, stream, stream->stream_id); in nghttp2_stream_dep_insert()
640 stream->sum_dep_weight = dep_stream->sum_dep_weight; in nghttp2_stream_dep_insert()
641 dep_stream->sum_dep_weight = stream->weight; in nghttp2_stream_dep_insert()
643 if (dep_stream->dep_next) { in nghttp2_stream_dep_insert()
644 for (si = dep_stream->dep_next; si; si = si->sib_next) { in nghttp2_stream_dep_insert()
647 rv = stream_obq_move(stream, dep_stream, si); in nghttp2_stream_dep_insert()
655 rv = stream_obq_push(dep_stream, stream); in nghttp2_stream_dep_insert()
661 stream->dep_next = dep_stream->dep_next; in nghttp2_stream_dep_insert()
664 dep_stream->dep_next = stream; in nghttp2_stream_dep_insert()
665 stream->dep_prev = dep_stream; in nghttp2_stream_dep_insert()
679 static void link_dep(nghttp2_stream *dep_stream, nghttp2_stream *stream) in link_dep() argument
681 dep_stream->dep_next = stream; in link_dep()
683 stream->dep_prev = dep_stream; in link_dep()
695 static void insert_link_dep(nghttp2_stream *dep_stream, nghttp2_stream *stream) in insert_link_dep() argument
701 sib_next = dep_stream->dep_next; in insert_link_dep()
705 link_dep(dep_stream, stream); in insert_link_dep()
786 void nghttp2_stream_dep_add(nghttp2_stream *dep_stream, nghttp2_stream *stream) in nghttp2_stream_dep_add() argument
788 DEBUGF("stream: dep_add dep_stream(%p)=%d, stream(%p)=%d\n", dep_stream, in nghttp2_stream_dep_add()
789 dep_stream->stream_id, stream, stream->stream_id); in nghttp2_stream_dep_add()
791 dep_stream->sum_dep_weight += stream->weight; in nghttp2_stream_dep_add()
793 if (dep_stream->dep_next == NULL) { in nghttp2_stream_dep_add()
794 link_dep(dep_stream, stream); in nghttp2_stream_dep_add()
796 insert_link_dep(dep_stream, stream); in nghttp2_stream_dep_add()
854 int nghttp2_stream_dep_insert_subtree(nghttp2_stream *dep_stream, in nghttp2_stream_dep_insert_subtree() argument
863 dep_stream, dep_stream->stream_id, stream, stream->stream_id); in nghttp2_stream_dep_insert_subtree()
865 stream->sum_dep_weight += dep_stream->sum_dep_weight; in nghttp2_stream_dep_insert_subtree()
866 dep_stream->sum_dep_weight = stream->weight; in nghttp2_stream_dep_insert_subtree()
868 if (dep_stream->dep_next) { in nghttp2_stream_dep_insert_subtree()
869 dep_next = dep_stream->dep_next; in nghttp2_stream_dep_insert_subtree()
871 link_dep(dep_stream, stream); in nghttp2_stream_dep_insert_subtree()
884 rv = stream_obq_move(stream, dep_stream, si); in nghttp2_stream_dep_insert_subtree()
891 link_dep(dep_stream, stream); in nghttp2_stream_dep_insert_subtree()
895 rv = stream_obq_push(dep_stream, stream); in nghttp2_stream_dep_insert_subtree()
901 validate_tree(dep_stream); in nghttp2_stream_dep_insert_subtree()
906 int nghttp2_stream_dep_add_subtree(nghttp2_stream *dep_stream, in nghttp2_stream_dep_add_subtree() argument
912 dep_stream, dep_stream->stream_id, stream, stream->stream_id); in nghttp2_stream_dep_add_subtree()
914 dep_stream->sum_dep_weight += stream->weight; in nghttp2_stream_dep_add_subtree()
916 if (dep_stream->dep_next) { in nghttp2_stream_dep_add_subtree()
917 insert_link_dep(dep_stream, stream); in nghttp2_stream_dep_add_subtree()
919 link_dep(dep_stream, stream); in nghttp2_stream_dep_add_subtree()
923 rv = stream_obq_push(dep_stream, stream); in nghttp2_stream_dep_add_subtree()
929 validate_tree(dep_stream); in nghttp2_stream_dep_add_subtree()