From 98bf7e6517aa6977a1d7be459143c13e28eb5e3c Mon Sep 17 00:00:00 2001
From: Craig Tiller <ctiller@google.com>
Date: Wed, 24 Jun 2015 08:47:07 -0700
Subject: [PATCH] Added comments

---
 src/core/channel/http_client_filter.c | 6 +++++-
 src/core/channel/http_server_filter.c | 4 ++++
 src/core/iomgr/iomgr.h                | 2 ++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/core/channel/http_client_filter.c b/src/core/channel/http_client_filter.c
index 62a7a1e7d9..08a2c0df3c 100644
--- a/src/core/channel/http_client_filter.c
+++ b/src/core/channel/http_client_filter.c
@@ -43,8 +43,12 @@ typedef struct call_data {
 
   int got_initial_metadata;
   grpc_stream_op_buffer *recv_ops;
-  grpc_iomgr_closure *on_done_recv;
 
+  /** Closure to call when finished with the hc_on_recv hook */
+  grpc_iomgr_closure *on_done_recv;
+  /** Receive closures are chained: we inject this closure as the on_done_recv
+      up-call on transport_op, and remember to call our on_done_recv member
+      after handling it. */
   grpc_iomgr_closure hc_on_recv;
 } call_data;
 
diff --git a/src/core/channel/http_server_filter.c b/src/core/channel/http_server_filter.c
index e5ce7a5dd8..d3a01fd1a8 100644
--- a/src/core/channel/http_server_filter.c
+++ b/src/core/channel/http_server_filter.c
@@ -47,7 +47,11 @@ typedef struct call_data {
   grpc_linked_mdelem status;
 
   grpc_stream_op_buffer *recv_ops;
+  /** Closure to call when finished with the hs_on_recv hook */
   grpc_iomgr_closure *on_done_recv;
+  /** Receive closures are chained: we inject this closure as the on_done_recv
+      up-call on transport_op, and remember to call our on_done_recv member
+      after handling it. */
   grpc_iomgr_closure hs_on_recv;
 } call_data;
 
diff --git a/src/core/iomgr/iomgr.h b/src/core/iomgr/iomgr.h
index 265c817db1..6d4a82917b 100644
--- a/src/core/iomgr/iomgr.h
+++ b/src/core/iomgr/iomgr.h
@@ -73,6 +73,8 @@ void grpc_iomgr_shutdown(void);
  * Can be called from within a callback or from anywhere else */
 void grpc_iomgr_add_callback(grpc_iomgr_closure *closure);
 
+/** As per grpc_iomgr_add_callback, with the ability to set the success
+    argument. */
 void grpc_iomgr_add_delayed_callback(grpc_iomgr_closure *iocb, int success);
 
 #endif  /* GRPC_INTERNAL_CORE_IOMGR_IOMGR_H */
-- 
GitLab