aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/iomgr/closure.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/iomgr/closure.c')
-rw-r--r--src/core/iomgr/closure.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/iomgr/closure.c b/src/core/iomgr/closure.c
index d91681990f..b4f1817de4 100644
--- a/src/core/iomgr/closure.c
+++ b/src/core/iomgr/closure.c
@@ -72,6 +72,16 @@ void grpc_closure_list_move(grpc_closure_list *src, grpc_closure_list *dst) {
src->head = src->tail = NULL;
}
+grpc_closure *grpc_closure_list_pop(grpc_closure_list *list) {
+ grpc_closure *head;
+ if (list->head == NULL) {
+ return NULL;
+ }
+ head = list->head;
+ list->head = list->head->next;
+ return head;
+}
+
typedef struct {
grpc_iomgr_cb_func cb;
void *cb_arg;