Nicolas Noble | b7ebd3b | 2014-11-26 16:33:03 -0800 | [diff] [blame] | 1 | /* |
| 2 | * |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 3 | * Copyright 2015 gRPC authors. |
Nicolas Noble | b7ebd3b | 2014-11-26 16:33:03 -0800 | [diff] [blame] | 4 | * |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
Nicolas Noble | b7ebd3b | 2014-11-26 16:33:03 -0800 | [diff] [blame] | 8 | * |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Nicolas Noble | b7ebd3b | 2014-11-26 16:33:03 -0800 | [diff] [blame] | 10 | * |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
Nicolas Noble | b7ebd3b | 2014-11-26 16:33:03 -0800 | [diff] [blame] | 16 | * |
| 17 | */ |
| 18 | |
Nicolas "Pixel" Noble | 1ff52d5 | 2015-03-01 05:24:36 +0100 | [diff] [blame] | 19 | #ifndef GRPC_SUPPORT_SYNC_H |
| 20 | #define GRPC_SUPPORT_SYNC_H |
Nicolas Noble | b7ebd3b | 2014-11-26 16:33:03 -0800 | [diff] [blame] | 21 | |
David Garcia Quintas | 8c5424f | 2016-08-01 22:49:00 -0700 | [diff] [blame] | 22 | #include <grpc/impl/codegen/gpr_types.h> /* for gpr_timespec */ |
David Garcia Quintas | 2425bbb | 2016-01-25 17:32:48 -0800 | [diff] [blame] | 23 | #include <grpc/impl/codegen/sync.h> |
Nicolas Noble | b7ebd3b | 2014-11-26 16:33:03 -0800 | [diff] [blame] | 24 | |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 25 | #ifdef __cplusplus |
| 26 | extern "C" { |
| 27 | #endif |
| 28 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 29 | /** --- Mutex interface --- |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 30 | |
| 31 | At most one thread may hold an exclusive lock on a mutex at any given time. |
| 32 | Actions taken by a thread that holds a mutex exclusively happen after |
| 33 | actions taken by all previous holders of the mutex. Variables of type |
| 34 | gpr_mu are uninitialized when first declared. */ |
| 35 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 36 | /** Initialize *mu. Requires: *mu uninitialized. */ |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 37 | GPRAPI void gpr_mu_init(gpr_mu *mu); |
| 38 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 39 | /** Cause *mu no longer to be initialized, freeing any memory in use. Requires: |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 40 | *mu initialized; no other concurrent operation on *mu. */ |
| 41 | GPRAPI void gpr_mu_destroy(gpr_mu *mu); |
| 42 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 43 | /** Wait until no thread has a lock on *mu, cause the calling thread to own an |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 44 | exclusive lock on *mu, then return. May block indefinitely or crash if the |
| 45 | calling thread has a lock on *mu. Requires: *mu initialized. */ |
| 46 | GPRAPI void gpr_mu_lock(gpr_mu *mu); |
| 47 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 48 | /** Release an exclusive lock on *mu held by the calling thread. Requires: *mu |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 49 | initialized; the calling thread holds an exclusive lock on *mu. */ |
| 50 | GPRAPI void gpr_mu_unlock(gpr_mu *mu); |
| 51 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 52 | /** Without blocking, attempt to acquire an exclusive lock on *mu for the |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 53 | calling thread, then return non-zero iff success. Fail, if any thread holds |
| 54 | the lock; succeeds with high probability if no thread holds the lock. |
| 55 | Requires: *mu initialized. */ |
| 56 | GPRAPI int gpr_mu_trylock(gpr_mu *mu); |
| 57 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 58 | /** --- Condition variable interface --- |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 59 | |
| 60 | A while-loop should be used with gpr_cv_wait() when waiting for conditions |
| 61 | to become true. See the example below. Variables of type gpr_cv are |
| 62 | uninitialized when first declared. */ |
| 63 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 64 | /** Initialize *cv. Requires: *cv uninitialized. */ |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 65 | GPRAPI void gpr_cv_init(gpr_cv *cv); |
| 66 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 67 | /** Cause *cv no longer to be initialized, freeing any memory in use. Requires: |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 68 | *cv initialized; no other concurrent operation on *cv.*/ |
| 69 | GPRAPI void gpr_cv_destroy(gpr_cv *cv); |
| 70 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 71 | /** Atomically release *mu and wait on *cv. When the calling thread is woken |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 72 | from *cv or the deadline abs_deadline is exceeded, execute gpr_mu_lock(mu) |
| 73 | and return whether the deadline was exceeded. Use |
| 74 | abs_deadline==gpr_inf_future for no deadline. abs_deadline can be either |
| 75 | an absolute deadline, or a GPR_TIMESPAN. May return even when not |
| 76 | woken explicitly. Requires: *mu and *cv initialized; the calling thread |
| 77 | holds an exclusive lock on *mu. */ |
| 78 | GPRAPI int gpr_cv_wait(gpr_cv *cv, gpr_mu *mu, gpr_timespec abs_deadline); |
| 79 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 80 | /** If any threads are waiting on *cv, wake at least one. |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 81 | Clients may treat this as an optimization of gpr_cv_broadcast() |
| 82 | for use in the case where waking more than one waiter is not useful. |
| 83 | Requires: *cv initialized. */ |
| 84 | GPRAPI void gpr_cv_signal(gpr_cv *cv); |
| 85 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 86 | /** Wake all threads waiting on *cv. Requires: *cv initialized. */ |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 87 | GPRAPI void gpr_cv_broadcast(gpr_cv *cv); |
| 88 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 89 | /** --- One-time initialization --- |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 90 | |
| 91 | gpr_once must be declared with static storage class, and initialized with |
| 92 | GPR_ONCE_INIT. e.g., |
| 93 | static gpr_once once_var = GPR_ONCE_INIT; */ |
| 94 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 95 | /** Ensure that (*init_routine)() has been called exactly once (for the |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 96 | specified gpr_once instance) and then return. |
| 97 | If multiple threads call gpr_once() on the same gpr_once instance, one of |
| 98 | them will call (*init_routine)(), and the others will block until that call |
| 99 | finishes.*/ |
| 100 | GPRAPI void gpr_once_init(gpr_once *once, void (*init_routine)(void)); |
| 101 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 102 | /** --- One-time event notification --- |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 103 | |
| 104 | These operations act on a gpr_event, which should be initialized with |
| 105 | gpr_ev_init(), or with GPR_EVENT_INIT if static, e.g., |
| 106 | static gpr_event event_var = GPR_EVENT_INIT; |
| 107 | It requires no destruction. */ |
| 108 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 109 | /** Initialize *ev. */ |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 110 | GPRAPI void gpr_event_init(gpr_event *ev); |
| 111 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 112 | /** Set *ev so that gpr_event_get() and gpr_event_wait() will return value. |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 113 | Requires: *ev initialized; value != NULL; no prior or concurrent calls to |
| 114 | gpr_event_set(ev, ...) since initialization. */ |
| 115 | GPRAPI void gpr_event_set(gpr_event *ev, void *value); |
| 116 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 117 | /** Return the value set by gpr_event_set(ev, ...), or NULL if no such call has |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 118 | completed. If the result is non-NULL, all operations that occurred prior to |
| 119 | the gpr_event_set(ev, ...) set will be visible after this call returns. |
| 120 | Requires: *ev initialized. This operation is faster than acquiring a mutex |
| 121 | on most platforms. */ |
| 122 | GPRAPI void *gpr_event_get(gpr_event *ev); |
| 123 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 124 | /** Wait until *ev is set by gpr_event_set(ev, ...), or abs_deadline is |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 125 | exceeded, then return gpr_event_get(ev). Requires: *ev initialized. Use |
| 126 | abs_deadline==gpr_inf_future for no deadline. When the event has been |
| 127 | signalled before the call, this operation is faster than acquiring a mutex |
| 128 | on most platforms. */ |
| 129 | GPRAPI void *gpr_event_wait(gpr_event *ev, gpr_timespec abs_deadline); |
| 130 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 131 | /** --- Reference counting --- |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 132 | |
| 133 | These calls act on the type gpr_refcount. It requires no destruction. */ |
| 134 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 135 | /** Initialize *r to value n. */ |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 136 | GPRAPI void gpr_ref_init(gpr_refcount *r, int n); |
| 137 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 138 | /** Increment the reference count *r. Requires *r initialized. */ |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 139 | GPRAPI void gpr_ref(gpr_refcount *r); |
| 140 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 141 | /** Increment the reference count *r. Requires *r initialized. |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 142 | Crashes if refcount is zero */ |
| 143 | GPRAPI void gpr_ref_non_zero(gpr_refcount *r); |
| 144 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 145 | /** Increment the reference count *r by n. Requires *r initialized, n > 0. */ |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 146 | GPRAPI void gpr_refn(gpr_refcount *r, int n); |
| 147 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 148 | /** Decrement the reference count *r and return non-zero iff it has reached |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 149 | zero. . Requires *r initialized. */ |
| 150 | GPRAPI int gpr_unref(gpr_refcount *r); |
| 151 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 152 | /** Return non-zero iff the reference count of *r is one, and thus is owned |
ncteisen | 2c94aae | 2017-02-16 15:01:17 -0800 | [diff] [blame] | 153 | by exactly one object. */ |
| 154 | GPRAPI int gpr_ref_is_unique(gpr_refcount *r); |
| 155 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 156 | /** --- Stats counters --- |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 157 | |
| 158 | These calls act on the integral type gpr_stats_counter. It requires no |
| 159 | destruction. Static instances may be initialized with |
| 160 | gpr_stats_counter c = GPR_STATS_INIT; |
| 161 | Beware: These operations do not imply memory barriers. Do not use them to |
| 162 | synchronize other events. */ |
| 163 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 164 | /** Initialize *c to the value n. */ |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 165 | GPRAPI void gpr_stats_init(gpr_stats_counter *c, intptr_t n); |
| 166 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 167 | /** *c += inc. Requires: *c initialized. */ |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 168 | GPRAPI void gpr_stats_inc(gpr_stats_counter *c, intptr_t inc); |
| 169 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 170 | /** Return *c. Requires: *c initialized. */ |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 171 | GPRAPI intptr_t gpr_stats_read(const gpr_stats_counter *c); |
| 172 | |
Alexander Polcyn | d809a15 | 2017-05-03 14:49:41 -0700 | [diff] [blame] | 173 | /** ==================Example use of interface=================== |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 174 | A producer-consumer queue of up to N integers, |
| 175 | illustrating the use of the calls in this interface. */ |
| 176 | #if 0 |
| 177 | |
| 178 | #define N 4 |
| 179 | |
| 180 | typedef struct queue { |
| 181 | gpr_cv non_empty; /* Signalled when length becomes non-zero. */ |
| 182 | gpr_cv non_full; /* Signalled when length becomes non-N. */ |
| 183 | gpr_mu mu; /* Protects all fields below. |
| 184 | (That is, except during initialization or |
| 185 | destruction, the fields below should be accessed |
| 186 | only by a thread that holds mu.) */ |
| 187 | int head; /* Index of head of queue 0..N-1. */ |
| 188 | int length; /* Number of valid elements in queue 0..N. */ |
| 189 | int elem[N]; /* elem[head .. head+length-1] are queue elements. */ |
| 190 | } queue; |
| 191 | |
| 192 | /* Initialize *q. */ |
| 193 | void queue_init(queue *q) { |
| 194 | gpr_mu_init(&q->mu); |
| 195 | gpr_cv_init(&q->non_empty); |
| 196 | gpr_cv_init(&q->non_full); |
| 197 | q->head = 0; |
| 198 | q->length = 0; |
| 199 | } |
| 200 | |
| 201 | /* Free storage associated with *q. */ |
| 202 | void queue_destroy(queue *q) { |
| 203 | gpr_mu_destroy(&q->mu); |
| 204 | gpr_cv_destroy(&q->non_empty); |
| 205 | gpr_cv_destroy(&q->non_full); |
| 206 | } |
| 207 | |
| 208 | /* Wait until there is room in *q, then append x to *q. */ |
| 209 | void queue_append(queue *q, int x) { |
| 210 | gpr_mu_lock(&q->mu); |
| 211 | /* To wait for a predicate without a deadline, loop on the negation of the |
| 212 | predicate, and use gpr_cv_wait(..., gpr_inf_future) inside the loop |
| 213 | to release the lock, wait, and reacquire on each iteration. Code that |
| 214 | makes the condition true should use gpr_cv_broadcast() on the |
| 215 | corresponding condition variable. The predicate must be on state |
| 216 | protected by the lock. */ |
| 217 | while (q->length == N) { |
| 218 | gpr_cv_wait(&q->non_full, &q->mu, gpr_inf_future); |
| 219 | } |
| 220 | if (q->length == 0) { /* Wake threads blocked in queue_remove(). */ |
| 221 | /* It's normal to use gpr_cv_broadcast() or gpr_signal() while |
| 222 | holding the lock. */ |
| 223 | gpr_cv_broadcast(&q->non_empty); |
| 224 | } |
| 225 | q->elem[(q->head + q->length) % N] = x; |
| 226 | q->length++; |
| 227 | gpr_mu_unlock(&q->mu); |
| 228 | } |
| 229 | |
| 230 | /* If it can be done without blocking, append x to *q and return non-zero. |
| 231 | Otherwise return 0. */ |
| 232 | int queue_try_append(queue *q, int x) { |
| 233 | int result = 0; |
| 234 | if (gpr_mu_trylock(&q->mu)) { |
| 235 | if (q->length != N) { |
| 236 | if (q->length == 0) { /* Wake threads blocked in queue_remove(). */ |
| 237 | gpr_cv_broadcast(&q->non_empty); |
| 238 | } |
| 239 | q->elem[(q->head + q->length) % N] = x; |
| 240 | q->length++; |
| 241 | result = 1; |
| 242 | } |
| 243 | gpr_mu_unlock(&q->mu); |
| 244 | } |
| 245 | return result; |
| 246 | } |
| 247 | |
| 248 | /* Wait until the *q is non-empty or deadline abs_deadline passes. If the |
| 249 | queue is non-empty, remove its head entry, place it in *head, and return |
| 250 | non-zero. Otherwise return 0. */ |
| 251 | int queue_remove(queue *q, int *head, gpr_timespec abs_deadline) { |
| 252 | int result = 0; |
| 253 | gpr_mu_lock(&q->mu); |
| 254 | /* To wait for a predicate with a deadline, loop on the negation of the |
| 255 | predicate or until gpr_cv_wait() returns true. Code that makes |
| 256 | the condition true should use gpr_cv_broadcast() on the corresponding |
| 257 | condition variable. The predicate must be on state protected by the |
| 258 | lock. */ |
| 259 | while (q->length == 0 && |
| 260 | !gpr_cv_wait(&q->non_empty, &q->mu, abs_deadline)) { |
| 261 | } |
| 262 | if (q->length != 0) { /* Queue is non-empty. */ |
| 263 | result = 1; |
| 264 | if (q->length == N) { /* Wake threads blocked in queue_append(). */ |
| 265 | gpr_cv_broadcast(&q->non_full); |
| 266 | } |
| 267 | *head = q->elem[q->head]; |
| 268 | q->head = (q->head + 1) % N; |
| 269 | q->length--; |
| 270 | } /* else deadline exceeded */ |
| 271 | gpr_mu_unlock(&q->mu); |
| 272 | return result; |
| 273 | } |
| 274 | #endif /* 0 */ |
| 275 | |
| 276 | #ifdef __cplusplus |
Craig Tiller | 1e8c2ab | 2017-10-12 15:50:13 -0700 | [diff] [blame^] | 277 | } // extern "C" |
Craig Tiller | ad059f7 | 2017-10-12 22:47:05 +0000 | [diff] [blame] | 278 | |
| 279 | namespace grpc_core { |
| 280 | |
| 281 | class mu_guard { |
Craig Tiller | 1e8c2ab | 2017-10-12 15:50:13 -0700 | [diff] [blame^] | 282 | public: |
Craig Tiller | ad059f7 | 2017-10-12 22:47:05 +0000 | [diff] [blame] | 283 | mu_guard(gpr_mu *mu) : mu_(mu) { gpr_mu_lock(mu); } |
| 284 | ~mu_guard() { gpr_mu_unlock(mu_); } |
| 285 | |
Craig Tiller | 1e8c2ab | 2017-10-12 15:50:13 -0700 | [diff] [blame^] | 286 | mu_guard(const mu_guard &) = delete; |
| 287 | mu_guard &operator=(const mu_guard &) = delete; |
Craig Tiller | ad059f7 | 2017-10-12 22:47:05 +0000 | [diff] [blame] | 288 | |
Craig Tiller | 1e8c2ab | 2017-10-12 15:50:13 -0700 | [diff] [blame^] | 289 | private: |
| 290 | gpr_mu *const mu_; |
Craig Tiller | ad059f7 | 2017-10-12 22:47:05 +0000 | [diff] [blame] | 291 | }; |
| 292 | |
Craig Tiller | 1e8c2ab | 2017-10-12 15:50:13 -0700 | [diff] [blame^] | 293 | } // namespace grpc_core |
David Garcia Quintas | 61887dc | 2016-07-27 23:17:34 -0700 | [diff] [blame] | 294 | #endif |
| 295 | |
Craig Tiller | d6c98df | 2015-08-18 09:33:44 -0700 | [diff] [blame] | 296 | #endif /* GRPC_SUPPORT_SYNC_H */ |