aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/transport
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-09-12 11:56:39 -0700
committerGravatar GitHub <noreply@github.com>2016-09-12 11:56:39 -0700
commit537f7c2a136641487febeac89a25e430029eb40c (patch)
tree0ca276fbe0dac5c2be06d8ba74ac2193cdd3f550 /src/core/lib/transport
parentec5c93cabfbf535be2528df55ca8bb4500e6bc9b (diff)
Revert "Grand unified closures"
Diffstat (limited to 'src/core/lib/transport')
-rw-r--r--src/core/lib/transport/transport.c27
-rw-r--r--src/core/lib/transport/transport.h21
2 files changed, 0 insertions, 48 deletions
diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c
index 08f9d7e8d9..857c3909d2 100644
--- a/src/core/lib/transport/transport.c
+++ b/src/core/lib/transport/transport.c
@@ -32,14 +32,10 @@
*/
#include "src/core/lib/transport/transport.h"
-
-#include <string.h>
-
#include <grpc/support/alloc.h>
#include <grpc/support/atm.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-
#include "src/core/lib/support/string.h"
#include "src/core/lib/transport/transport_impl.h"
@@ -251,26 +247,3 @@ void grpc_transport_stream_op_add_close(grpc_transport_stream_op *op,
error = grpc_error_set_int(error, GRPC_ERROR_INT_GRPC_STATUS, status);
add_error(op, &op->close_error, error);
}
-
-typedef struct {
- grpc_closure outer_on_complete;
- grpc_closure *inner_on_complete;
- grpc_transport_op op;
-} made_transport_op;
-
-static void destroy_made_transport_op(grpc_exec_ctx *exec_ctx, void *arg,
- grpc_error *error) {
- made_transport_op *op = arg;
- grpc_exec_ctx_sched(exec_ctx, op->inner_on_complete, GRPC_ERROR_REF(error),
- NULL);
- gpr_free(op);
-}
-
-grpc_transport_op *grpc_make_transport_op(grpc_closure *on_complete) {
- made_transport_op *op = gpr_malloc(sizeof(*op));
- grpc_closure_init(&op->outer_on_complete, destroy_made_transport_op, op);
- op->inner_on_complete = on_complete;
- memset(&op->op, 0, sizeof(op->op));
- op->op.on_consumed = &op->outer_on_complete;
- return &op->op;
-}
diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h
index 8dc393fd61..26ed6cb839 100644
--- a/src/core/lib/transport/transport.h
+++ b/src/core/lib/transport/transport.h
@@ -100,11 +100,6 @@ void grpc_transport_move_one_way_stats(grpc_transport_one_way_stats *from,
void grpc_transport_move_stats(grpc_transport_stream_stats *from,
grpc_transport_stream_stats *to);
-typedef struct {
- grpc_closure closure;
- void *args[2];
-} grpc_transport_private_op_data;
-
/* Transport stream op: a set of operations to perform on a transport
against a single stream */
typedef struct grpc_transport_stream_op {
@@ -154,12 +149,6 @@ typedef struct grpc_transport_stream_op {
/* Indexes correspond to grpc_context_index enum values */
grpc_call_context_element *context;
-
- /***************************************************************************
- * remaining fields are initialized and used at the discretion of the
- * transport implementation */
-
- grpc_transport_private_op_data transport_private;
} grpc_transport_stream_op;
/** Transport op: a set of operations to perform on a transport as a whole */
@@ -193,12 +182,6 @@ typedef struct grpc_transport_op {
grpc_pollset_set *bind_pollset_set;
/** send a ping, call this back if not NULL */
grpc_closure *send_ping;
-
- /***************************************************************************
- * remaining fields are initialized and used at the discretion of the
- * transport implementation */
-
- grpc_transport_private_op_data transport_private;
} grpc_transport_op;
/* Returns the amount of memory required to store a grpc_stream for this
@@ -290,10 +273,6 @@ void grpc_transport_destroy(grpc_exec_ctx *exec_ctx, grpc_transport *transport);
char *grpc_transport_get_peer(grpc_exec_ctx *exec_ctx,
grpc_transport *transport);
-/* Allocate a grpc_transport_op, and preconfigure the on_consumed closure to
- \a on_consumed and then delete the returned transport op */
-grpc_transport_op *grpc_make_transport_op(grpc_closure *on_consumed);
-
#ifdef __cplusplus
}
#endif