aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc/grpc.h
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2017-09-07 18:34:56 -0700
committerGravatar GitHub <noreply@github.com>2017-09-07 18:34:56 -0700
commit7f6a27a4d3675adc0de263d291346aab2f46e733 (patch)
tree6e13798324a9972a9202672c238c0e6a09a9fb3a /include/grpc/grpc.h
parentbf3b8445fed56ba921dd016b4690f6ba3e127ec3 (diff)
parent58c33ba19bcec079d0991822055f28e804540426 (diff)
Merge pull request #12372 from vjpai/armalarmadingdong
Core API change: Decouple alarm construction from setting to avoid races in MT code
Diffstat (limited to 'include/grpc/grpc.h')
-rw-r--r--include/grpc/grpc.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h
index b562167b5f..fab7d438aa 100644
--- a/include/grpc/grpc.h
+++ b/include/grpc/grpc.h
@@ -143,21 +143,24 @@ GRPCAPI void grpc_completion_queue_shutdown(grpc_completion_queue *cq);
drained and no threads are executing grpc_completion_queue_next */
GRPCAPI void grpc_completion_queue_destroy(grpc_completion_queue *cq);
-/** Create a completion queue alarm instance associated to \a cq.
+/** Create a completion queue alarm instance */
+GRPCAPI grpc_alarm *grpc_alarm_create(void *reserved);
+
+/** Set a completion queue alarm instance associated to \a cq.
*
* Once the alarm expires (at \a deadline) or it's cancelled (see \a
* grpc_alarm_cancel), an event with tag \a tag will be added to \a cq. If the
* alarm expired, the event's success bit will be true, false otherwise (ie,
* upon cancellation). */
-GRPCAPI grpc_alarm *grpc_alarm_create(grpc_completion_queue *cq,
- gpr_timespec deadline, void *tag);
+GRPCAPI void grpc_alarm_set(grpc_alarm *alarm, grpc_completion_queue *cq,
+ gpr_timespec deadline, void *tag, void *reserved);
/** Cancel a completion queue alarm. Calling this function over an alarm that
* has already fired has no effect. */
-GRPCAPI void grpc_alarm_cancel(grpc_alarm *alarm);
+GRPCAPI void grpc_alarm_cancel(grpc_alarm *alarm, void *reserved);
/** Destroy the given completion queue alarm, cancelling it in the process. */
-GRPCAPI void grpc_alarm_destroy(grpc_alarm *alarm);
+GRPCAPI void grpc_alarm_destroy(grpc_alarm *alarm, void *reserved);
/** Check the connectivity state of a channel. */
GRPCAPI grpc_connectivity_state grpc_channel_check_connectivity_state(