Lines Matching refs:gaptr
31 void nghttp3_gaptr_init(nghttp3_gaptr *gaptr, const nghttp3_mem *mem) {
32 nghttp3_ksl_init(&gaptr->gap, nghttp3_ksl_range_compar, sizeof(nghttp3_range),
35 gaptr->mem = mem;
38 static int gaptr_gap_init(nghttp3_gaptr *gaptr) {
42 rv = nghttp3_ksl_insert(&gaptr->gap, NULL, &range, NULL);
50 void nghttp3_gaptr_free(nghttp3_gaptr *gaptr) {
51 if (gaptr == NULL) {
55 nghttp3_ksl_free(&gaptr->gap);
58 int nghttp3_gaptr_push(nghttp3_gaptr *gaptr, uint64_t offset,
64 if (nghttp3_ksl_len(&gaptr->gap) == 0) {
65 rv = gaptr_gap_init(gaptr);
71 it = nghttp3_ksl_lower_bound_compar(&gaptr->gap, &q,
82 nghttp3_ksl_remove_hint(&gaptr->gap, &it, &it, &k);
87 nghttp3_ksl_update_key(&gaptr->gap, &k, &l);
90 rv = nghttp3_ksl_insert(&gaptr->gap, &it, &r, NULL);
96 nghttp3_ksl_update_key(&gaptr->gap, &k, &r);
103 uint64_t nghttp3_gaptr_first_gap_offset(nghttp3_gaptr *gaptr) {
107 if (nghttp3_ksl_len(&gaptr->gap) == 0) {
111 it = nghttp3_ksl_begin(&gaptr->gap);
117 nghttp3_range nghttp3_gaptr_get_first_gap_after(nghttp3_gaptr *gaptr,
122 if (nghttp3_ksl_len(&gaptr->gap) == 0) {
127 it = nghttp3_ksl_lower_bound_compar(&gaptr->gap, &q,
135 int nghttp3_gaptr_is_pushed(nghttp3_gaptr *gaptr, uint64_t offset,
142 if (nghttp3_ksl_len(&gaptr->gap) == 0) {
146 it = nghttp3_ksl_lower_bound_compar(&gaptr->gap, &q,
154 void nghttp3_gaptr_drop_first_gap(nghttp3_gaptr *gaptr) {
158 if (nghttp3_ksl_len(&gaptr->gap) == 0) {
162 it = nghttp3_ksl_begin(&gaptr->gap);
168 nghttp3_ksl_remove_hint(&gaptr->gap, NULL, &it, &r);