Go to the documentation of this file.
19 #ifndef GRPC_SUPPORT_SYNC_H
20 #define GRPC_SUPPORT_SYNC_H
182 typedef struct queue {
219 while (
q->length ==
N) {
222 if (
q->length == 0) {
227 q->elem[(
q->head +
q->length) %
N] =
x;
237 if (
q->length !=
N) {
238 if (
q->length == 0) {
241 q->elem[(
q->head +
q->length) %
N] =
x;
261 while (
q->length == 0 &&
264 if (
q->length != 0) {
266 if (
q->length ==
N) {
269 *head =
q->elem[
q->head];
270 q->head = (
q->head + 1) %
N;
GPRAPI void gpr_cv_signal(gpr_cv *cv)
GPRAPI void gpr_mu_unlock(gpr_mu *mu)
GPRAPI void gpr_refn(gpr_refcount *r, int n)
GPRAPI void * gpr_event_get(gpr_event *ev)
GPRAPI void gpr_event_set(gpr_event *ev, void *value)
GPRAPI intptr_t gpr_stats_read(const gpr_stats_counter *c)
void queue_init(queue *q)
GPRAPI gpr_timespec gpr_inf_future(gpr_clock_type type)
int queue_remove(queue *q, int *head, gpr_timespec abs_deadline)
GPRAPI void gpr_once_init(gpr_once *once, void(*init_function)(void))
GPRAPI void gpr_stats_init(gpr_stats_counter *c, intptr_t n)
GPRAPI void gpr_mu_destroy(gpr_mu *mu)
void queue_destroy(queue *q)
GPRAPI void gpr_cv_destroy(gpr_cv *cv)
GPRAPI void gpr_mu_init(gpr_mu *mu)
GPRAPI int gpr_cv_wait(gpr_cv *cv, gpr_mu *mu, gpr_timespec abs_deadline)
GPRAPI void gpr_mu_lock(gpr_mu *mu)
GPRAPI void gpr_event_init(gpr_event *ev)
GPRAPI void * gpr_event_wait(gpr_event *ev, gpr_timespec abs_deadline)
int queue_try_append(queue *q, int x)
void queue_append(queue *q, int x)
GPRAPI void gpr_ref_non_zero(gpr_refcount *r)
GPRAPI int gpr_mu_trylock(gpr_mu *mu)
GPRAPI void gpr_stats_inc(gpr_stats_counter *c, intptr_t inc)
GPRAPI void gpr_cv_broadcast(gpr_cv *cv)
GPRAPI void gpr_ref_init(gpr_refcount *r, int n)
GPRAPI int gpr_unref(gpr_refcount *r)
GPRAPI void gpr_ref(gpr_refcount *r)
GPRAPI int gpr_ref_is_unique(gpr_refcount *r)
GPRAPI void gpr_cv_init(gpr_cv *cv)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:28