aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/transport/chttp2/internal.h
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2016-03-03 00:55:54 -0800
committerGravatar Vijay Pai <vpai@google.com>2016-03-03 00:55:54 -0800
commit40d27ba78455d9c5ef1feef250d0d889d6bfb746 (patch)
tree9c5000567bd52328ed9827c9e2e5a8c671d94158 /src/core/transport/chttp2/internal.h
parentbfc8a8d0496c1e505815772b623760a2ecf1e4d0 (diff)
parent0cb803d9ca4286601e9e6a3240cfa3488b662b7c (diff)
Merge pull request #5535 from ctiller/streams
Refcounting fix for bug exposed by qps_test
Diffstat (limited to 'src/core/transport/chttp2/internal.h')
-rw-r--r--src/core/transport/chttp2/internal.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h
index d76d31be23..891aad6ef2 100644
--- a/src/core/transport/chttp2/internal.h
+++ b/src/core/transport/chttp2/internal.h
@@ -417,7 +417,7 @@ typedef struct {
/** HTTP2 stream id for this stream, or zero if one has not been assigned */
uint32_t id;
uint8_t fetching;
- uint8_t sent_initial_metadata;
+ bool sent_initial_metadata;
uint8_t sent_message;
uint8_t sent_trailing_metadata;
uint8_t read_closed;
@@ -509,7 +509,7 @@ void grpc_chttp2_publish_reads(grpc_exec_ctx *exec_ctx,
grpc_chttp2_transport_global *global,
grpc_chttp2_transport_parsing *parsing);
-void grpc_chttp2_list_add_writable_stream(
+bool grpc_chttp2_list_add_writable_stream(
grpc_chttp2_transport_global *transport_global,
grpc_chttp2_stream_global *stream_global);
/** Get a writable stream
@@ -519,14 +519,13 @@ int grpc_chttp2_list_pop_writable_stream(
grpc_chttp2_transport_writing *transport_writing,
grpc_chttp2_stream_global **stream_global,
grpc_chttp2_stream_writing **stream_writing);
-void grpc_chttp2_list_remove_writable_stream(
+bool grpc_chttp2_list_remove_writable_stream(
grpc_chttp2_transport_global *transport_global,
- grpc_chttp2_stream_global *stream_global);
+ grpc_chttp2_stream_global *stream_global) GRPC_MUST_USE_RESULT;
-/* returns 1 if stream added, 0 if it was already present */
-int grpc_chttp2_list_add_writing_stream(
+void grpc_chttp2_list_add_writing_stream(
grpc_chttp2_transport_writing *transport_writing,
- grpc_chttp2_stream_writing *stream_writing) GRPC_MUST_USE_RESULT;
+ grpc_chttp2_stream_writing *stream_writing);
int grpc_chttp2_list_have_writing_streams(
grpc_chttp2_transport_writing *transport_writing);
int grpc_chttp2_list_pop_writing_stream(
@@ -770,4 +769,9 @@ void grpc_chttp2_ack_ping(grpc_exec_ctx *exec_ctx,
grpc_chttp2_transport_parsing *parsing,
const uint8_t *opaque_8bytes);
+/** add a ref to the stream and add it to the writable list;
+ ref will be dropped in writing.c */
+void grpc_chttp2_become_writable(grpc_chttp2_transport_global *transport_global,
+ grpc_chttp2_stream_global *stream_global);
+
#endif