aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/transport/metadata_batch.h
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-12-06 09:05:05 -0800
committerGravatar GitHub <noreply@github.com>2017-12-06 09:05:05 -0800
commitad4d2dde0052efbbf49d64b0843c45f0381cfeb3 (patch)
tree6a657f8c6179d873b34505cdc24bce9462ca68eb /src/core/lib/transport/metadata_batch.h
parenta3df36cc2505a89c2f481eea4a66a87b3002844a (diff)
Revert "All instances of exec_ctx being passed around in src/core removed"
Diffstat (limited to 'src/core/lib/transport/metadata_batch.h')
-rw-r--r--src/core/lib/transport/metadata_batch.h42
1 files changed, 24 insertions, 18 deletions
diff --git a/src/core/lib/transport/metadata_batch.h b/src/core/lib/transport/metadata_batch.h
index 8353a426f8..adfb2d8069 100644
--- a/src/core/lib/transport/metadata_batch.h
+++ b/src/core/lib/transport/metadata_batch.h
@@ -53,23 +53,28 @@ typedef struct grpc_metadata_batch {
} grpc_metadata_batch;
void grpc_metadata_batch_init(grpc_metadata_batch* batch);
-void grpc_metadata_batch_destroy(grpc_metadata_batch* batch);
-void grpc_metadata_batch_clear(grpc_metadata_batch* batch);
+void grpc_metadata_batch_destroy(grpc_exec_ctx* exec_ctx,
+ grpc_metadata_batch* batch);
+void grpc_metadata_batch_clear(grpc_exec_ctx* exec_ctx,
+ grpc_metadata_batch* batch);
bool grpc_metadata_batch_is_empty(grpc_metadata_batch* batch);
/* Returns the transport size of the batch. */
size_t grpc_metadata_batch_size(grpc_metadata_batch* batch);
/** Remove \a storage from the batch, unreffing the mdelem contained */
-void grpc_metadata_batch_remove(grpc_metadata_batch* batch,
+void grpc_metadata_batch_remove(grpc_exec_ctx* exec_ctx,
+ grpc_metadata_batch* batch,
grpc_linked_mdelem* storage);
/** Substitute a new mdelem for an old value */
-grpc_error* grpc_metadata_batch_substitute(grpc_metadata_batch* batch,
+grpc_error* grpc_metadata_batch_substitute(grpc_exec_ctx* exec_ctx,
+ grpc_metadata_batch* batch,
grpc_linked_mdelem* storage,
grpc_mdelem new_value);
-void grpc_metadata_batch_set_value(grpc_linked_mdelem* storage,
+void grpc_metadata_batch_set_value(grpc_exec_ctx* exec_ctx,
+ grpc_linked_mdelem* storage,
grpc_slice value);
/** Add \a storage to the beginning of \a batch. storage->md is
@@ -77,17 +82,17 @@ void grpc_metadata_batch_set_value(grpc_linked_mdelem* storage,
\a storage is owned by the caller and must survive for the
lifetime of batch. This usually means it should be around
for the lifetime of the call. */
-grpc_error* grpc_metadata_batch_link_head(grpc_metadata_batch* batch,
- grpc_linked_mdelem* storage)
- GRPC_MUST_USE_RESULT;
+grpc_error* grpc_metadata_batch_link_head(
+ grpc_exec_ctx* exec_ctx, grpc_metadata_batch* batch,
+ grpc_linked_mdelem* storage) GRPC_MUST_USE_RESULT;
/** Add \a storage to the end of \a batch. storage->md is
assumed to be valid.
\a storage is owned by the caller and must survive for the
lifetime of batch. This usually means it should be around
for the lifetime of the call. */
-grpc_error* grpc_metadata_batch_link_tail(grpc_metadata_batch* batch,
- grpc_linked_mdelem* storage)
- GRPC_MUST_USE_RESULT;
+grpc_error* grpc_metadata_batch_link_tail(
+ grpc_exec_ctx* exec_ctx, grpc_metadata_batch* batch,
+ grpc_linked_mdelem* storage) GRPC_MUST_USE_RESULT;
/** Add \a elem_to_add as the first element in \a batch, using
\a storage as backing storage for the linked list element.
@@ -96,8 +101,8 @@ grpc_error* grpc_metadata_batch_link_tail(grpc_metadata_batch* batch,
for the lifetime of the call.
Takes ownership of \a elem_to_add */
grpc_error* grpc_metadata_batch_add_head(
- grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
- grpc_mdelem elem_to_add) GRPC_MUST_USE_RESULT;
+ grpc_exec_ctx* exec_ctx, grpc_metadata_batch* batch,
+ grpc_linked_mdelem* storage, grpc_mdelem elem_to_add) GRPC_MUST_USE_RESULT;
/** Add \a elem_to_add as the last element in \a batch, using
\a storage as backing storage for the linked list element.
\a storage is owned by the caller and must survive for the
@@ -105,8 +110,8 @@ grpc_error* grpc_metadata_batch_add_head(
for the lifetime of the call.
Takes ownership of \a elem_to_add */
grpc_error* grpc_metadata_batch_add_tail(
- grpc_metadata_batch* batch, grpc_linked_mdelem* storage,
- grpc_mdelem elem_to_add) GRPC_MUST_USE_RESULT;
+ grpc_exec_ctx* exec_ctx, grpc_metadata_batch* batch,
+ grpc_linked_mdelem* storage, grpc_mdelem elem_to_add) GRPC_MUST_USE_RESULT;
grpc_error* grpc_attach_md_to_error(grpc_error* src, grpc_mdelem md);
@@ -123,10 +128,11 @@ typedef struct {
{ GRPC_ERROR_NONE, GRPC_MDNULL }
typedef grpc_filtered_mdelem (*grpc_metadata_batch_filter_func)(
- void* user_data, grpc_mdelem elem);
+ grpc_exec_ctx* exec_ctx, void* user_data, grpc_mdelem elem);
grpc_error* grpc_metadata_batch_filter(
- grpc_metadata_batch* batch, grpc_metadata_batch_filter_func func,
- void* user_data, const char* composite_error_string) GRPC_MUST_USE_RESULT;
+ grpc_exec_ctx* exec_ctx, grpc_metadata_batch* batch,
+ grpc_metadata_batch_filter_func func, void* user_data,
+ const char* composite_error_string) GRPC_MUST_USE_RESULT;
#ifndef NDEBUG
void grpc_metadata_batch_assert_ok(grpc_metadata_batch* comd);