diff options
author | 2017-03-13 13:34:58 -0700 | |
---|---|---|
committer | 2017-03-13 13:34:58 -0700 | |
commit | 77af9d832de23246bcc07bc814e3d989413db079 (patch) | |
tree | 0dd6f1f6516294e461c08d7a5121690d8ec158ed /src/core/lib/transport/transport.h | |
parent | 9d3203a5ea195801eb7358beced8c2f472a7d9b2 (diff) | |
parent | c5591f5143b6fb34f2f4ce6ae5d4ea18d9d65bf3 (diff) |
Merge github.com:grpc/grpc into trim-the-locks
Diffstat (limited to 'src/core/lib/transport/transport.h')
-rw-r--r-- | src/core/lib/transport/transport.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index bb23c0225a..cc1c277b35 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -64,6 +64,7 @@ typedef struct grpc_stream_refcount { #ifdef GRPC_STREAM_REFCOUNT_DEBUG const char *object_type; #endif + grpc_slice_refcount slice_refcount; } grpc_stream_refcount; #ifdef GRPC_STREAM_REFCOUNT_DEBUG @@ -84,6 +85,11 @@ void grpc_stream_unref(grpc_exec_ctx *exec_ctx, grpc_stream_refcount *refcount); grpc_stream_ref_init(rc, ir, cb, cb_arg) #endif +/* Wrap a buffer that is owned by some stream object into a slice that shares + the same refcount */ +grpc_slice grpc_slice_from_stream_owned_buffer(grpc_stream_refcount *refcount, + void *buffer, size_t length); + typedef struct { uint64_t framing_bytes; uint64_t data_bytes; |