Exemplo n.º 1
0
int grpc_chttp2_list_pop_writing_stream(
    grpc_chttp2_transport_writing *transport_writing,
    grpc_chttp2_stream_writing **stream_writing) {
  grpc_chttp2_stream *stream;
  int r = stream_list_pop(TRANSPORT_FROM_WRITING(transport_writing), &stream,
                          GRPC_CHTTP2_LIST_WRITING);
  *stream_writing = &stream->writing;
  return r;
}
Exemplo n.º 2
0
int grpc_chttp2_list_pop_cancelled_waiting_for_writing(
    grpc_chttp2_transport_global *transport_global,
    grpc_chttp2_stream_global **stream_global) {
  grpc_chttp2_stream *stream;
  int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream,
                          GRPC_CHTTP2_LIST_CANCELLED_WAITING_FOR_WRITING);
  *stream_global = &stream->global;
  return r;
}
Exemplo n.º 3
0
int grpc_chttp2_list_pop_writable_window_update_stream(
    grpc_chttp2_transport_global *transport_global,
    grpc_chttp2_stream_global **stream_global) {
  grpc_chttp2_stream *stream;
  int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream,
                          GRPC_CHTTP2_LIST_WRITABLE_WINDOW_UPDATE);
  *stream_global = &stream->global;
  return r;
}
Exemplo n.º 4
0
int grpc_chttp2_list_pop_read_write_state_changed(
    grpc_chttp2_transport_global *transport_global,
    grpc_chttp2_stream_global **stream_global) {
  grpc_chttp2_stream *stream;
  int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream,
                          GRPC_CHTTP2_LIST_READ_WRITE_STATE_CHANGED);
  *stream_global = &stream->global;
  return r;
}
Exemplo n.º 5
0
int grpc_chttp2_list_pop_waiting_for_concurrency(
    grpc_chttp2_transport_global *transport_global,
    grpc_chttp2_stream_global **stream_global) {
  grpc_chttp2_stream *stream;
  int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream,
                          GRPC_CHTTP2_LIST_WAITING_FOR_CONCURRENCY);
  *stream_global = &stream->global;
  return r;
}
Exemplo n.º 6
0
int grpc_chttp2_list_pop_closed_waiting_for_parsing(
    grpc_chttp2_transport_global *transport_global,
    grpc_chttp2_stream_global **stream_global) {
  grpc_chttp2_stream *stream;
  int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream,
                          GRPC_CHTTP2_LIST_CLOSED_WAITING_FOR_PARSING);
  *stream_global = &stream->global;
  return r;
}
Exemplo n.º 7
0
int grpc_chttp2_list_pop_stalled_by_transport(
    grpc_chttp2_transport_global *transport_global,
    grpc_chttp2_stream_global **stream_global) {
  grpc_chttp2_stream *stream;
  int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream,
                          GRPC_CHTTP2_LIST_STALLED_BY_TRANSPORT);
  if (r != 0) {
    *stream_global = &stream->global;
  }
  return r;
}
Exemplo n.º 8
0
int grpc_chttp2_list_pop_check_read_ops(
    grpc_chttp2_transport_global *transport_global,
    grpc_chttp2_stream_global **stream_global) {
  grpc_chttp2_stream *stream;
  int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream,
                          GRPC_CHTTP2_LIST_CHECK_READ_OPS);
  if (r != 0) {
    *stream_global = &stream->global;
  }
  return r;
}
Exemplo n.º 9
0
int grpc_chttp2_list_pop_incoming_window_updated(
    grpc_chttp2_transport_global *transport_global,
    grpc_chttp2_transport_parsing *transport_parsing,
    grpc_chttp2_stream_global **stream_global,
    grpc_chttp2_stream_parsing **stream_parsing) {
  grpc_chttp2_stream *stream;
  int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream,
                          GRPC_CHTTP2_LIST_INCOMING_WINDOW_UPDATED);
  *stream_global = &stream->global;
  *stream_parsing = &stream->parsing;
  return r;
}
Exemplo n.º 10
0
int grpc_chttp2_list_pop_writable_stream(
    grpc_chttp2_transport_global *transport_global,
    grpc_chttp2_transport_writing *transport_writing,
    grpc_chttp2_stream_global **stream_global,
    grpc_chttp2_stream_writing **stream_writing) {
  grpc_chttp2_stream *stream;
  int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream,
                          GRPC_CHTTP2_LIST_WRITABLE);
  *stream_global = &stream->global;
  *stream_writing = &stream->writing;
  return r;
}
Exemplo n.º 11
0
int grpc_chttp2_list_pop_parsing_seen_stream(
    grpc_chttp2_transport_global *transport_global,
    grpc_chttp2_transport_parsing *transport_parsing,
    grpc_chttp2_stream_global **stream_global,
    grpc_chttp2_stream_parsing **stream_parsing) {
  grpc_chttp2_stream *stream;
  int r = stream_list_pop(TRANSPORT_FROM_PARSING(transport_parsing), &stream,
                          GRPC_CHTTP2_LIST_PARSING_SEEN);
  *stream_global = &stream->global;
  *stream_parsing = &stream->parsing;
  return r;
}
Exemplo n.º 12
0
int grpc_chttp2_list_pop_written_stream(
    grpc_chttp2_transport_global *transport_global,
    grpc_chttp2_transport_writing *transport_writing,
    grpc_chttp2_stream_global **stream_global,
    grpc_chttp2_stream_writing **stream_writing) {
  grpc_chttp2_stream *stream;
  int r = stream_list_pop(TRANSPORT_FROM_WRITING(transport_writing), &stream,
                          GRPC_CHTTP2_LIST_WRITTEN);
  if (r != 0) {
    *stream_global = &stream->global;
    *stream_writing = &stream->writing;
  }
  return r;
}
Exemplo n.º 13
0
int grpc_chttp2_list_pop_unannounced_incoming_window_available(
    grpc_chttp2_transport_global *transport_global,
    grpc_chttp2_transport_parsing *transport_parsing,
    grpc_chttp2_stream_global **stream_global,
    grpc_chttp2_stream_parsing **stream_parsing) {
  grpc_chttp2_stream *stream;
  int r =
      stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream,
                      GRPC_CHTTP2_LIST_UNANNOUNCED_INCOMING_WINDOW_AVAILABLE);
  if (r != 0) {
    *stream_global = &stream->global;
    *stream_parsing = &stream->parsing;
  }
  return r;
}
Exemplo n.º 14
0
bool grpc_chttp2_list_flush_writing_stalled_by_transport(
    grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_writing *transport_writing) {
  grpc_chttp2_stream *stream;
  bool out = false;
  grpc_chttp2_transport *transport = TRANSPORT_FROM_WRITING(transport_writing);
  while (stream_list_pop(transport, &stream,
                         GRPC_CHTTP2_LIST_WRITING_STALLED_BY_TRANSPORT)) {
    gpr_log(GPR_DEBUG, "move %d from writing stalled to just stalled",
            stream->global.id);
    grpc_chttp2_list_add_stalled_by_transport(transport_writing,
                                              &stream->writing);
    GRPC_CHTTP2_STREAM_UNREF(exec_ctx, &stream->global,
                             "chttp2_writing_stalled");
    out = true;
  }
  return out;
}
Exemplo n.º 15
0
bool grpc_chttp2_list_pop_writing_stream(grpc_chttp2_transport *t,
                                         grpc_chttp2_stream **s) {
  return stream_list_pop(t, s, GRPC_CHTTP2_LIST_WRITING);
}
Exemplo n.º 16
0
bool grpc_chttp2_list_pop_stalled_by_stream(grpc_chttp2_transport *t,
                                            grpc_chttp2_stream **s) {
  return stream_list_pop(t, s, GRPC_CHTTP2_LIST_STALLED_BY_STREAM);
}
Exemplo n.º 17
0
bool grpc_chttp2_list_pop_waiting_for_concurrency(grpc_chttp2_transport *t,
                                                  grpc_chttp2_stream **s) {
  return stream_list_pop(t, s, GRPC_CHTTP2_LIST_WAITING_FOR_CONCURRENCY);
}