diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2016-02-08 22:53:14 +0100 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2016-02-08 22:53:14 +0100 |
commit | cd41a0b549fa81d88ed804e1cdf59bb492fa9171 (patch) | |
tree | b0cd54f998ae485096f1e71cbb0c82a588a3fa60 /include/grpc/impl/codegen/sync.h | |
parent | 81b780b84b77a093ac2273865cd1af8a0f6f69bf (diff) |
Removing undescores in {GPR,GRPC,CENSUS}_API.
Diffstat (limited to 'include/grpc/impl/codegen/sync.h')
-rw-r--r-- | include/grpc/impl/codegen/sync.h | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/include/grpc/impl/codegen/sync.h b/include/grpc/impl/codegen/sync.h index 04ff0dc5bf..d2f19d37d6 100644 --- a/include/grpc/impl/codegen/sync.h +++ b/include/grpc/impl/codegen/sync.h @@ -78,26 +78,26 @@ extern "C" { gpr_mu are uninitialized when first declared. */ /* Initialize *mu. Requires: *mu uninitialized. */ -GPR_API void gpr_mu_init(gpr_mu *mu); +GPRAPI void gpr_mu_init(gpr_mu *mu); /* Cause *mu no longer to be initialized, freeing any memory in use. Requires: *mu initialized; no other concurrent operation on *mu. */ -GPR_API void gpr_mu_destroy(gpr_mu *mu); +GPRAPI void gpr_mu_destroy(gpr_mu *mu); /* Wait until no thread has a lock on *mu, cause the calling thread to own an exclusive lock on *mu, then return. May block indefinitely or crash if the calling thread has a lock on *mu. Requires: *mu initialized. */ -GPR_API void gpr_mu_lock(gpr_mu *mu); +GPRAPI void gpr_mu_lock(gpr_mu *mu); /* Release an exclusive lock on *mu held by the calling thread. Requires: *mu initialized; the calling thread holds an exclusive lock on *mu. */ -GPR_API void gpr_mu_unlock(gpr_mu *mu); +GPRAPI void gpr_mu_unlock(gpr_mu *mu); /* Without blocking, attempt to acquire an exclusive lock on *mu for the calling thread, then return non-zero iff success. Fail, if any thread holds the lock; succeeds with high probability if no thread holds the lock. Requires: *mu initialized. */ -GPR_API int gpr_mu_trylock(gpr_mu *mu); +GPRAPI int gpr_mu_trylock(gpr_mu *mu); /* --- Condition variable interface --- @@ -106,11 +106,11 @@ GPR_API int gpr_mu_trylock(gpr_mu *mu); uninitialized when first declared. */ /* Initialize *cv. Requires: *cv uninitialized. */ -GPR_API void gpr_cv_init(gpr_cv *cv); +GPRAPI void gpr_cv_init(gpr_cv *cv); /* Cause *cv no longer to be initialized, freeing any memory in use. Requires: *cv initialized; no other concurrent operation on *cv.*/ -GPR_API void gpr_cv_destroy(gpr_cv *cv); +GPRAPI void gpr_cv_destroy(gpr_cv *cv); /* Atomically release *mu and wait on *cv. When the calling thread is woken from *cv or the deadline abs_deadline is exceeded, execute gpr_mu_lock(mu) @@ -119,16 +119,16 @@ GPR_API void gpr_cv_destroy(gpr_cv *cv); an absolute deadline, or a GPR_TIMESPAN. May return even when not woken explicitly. Requires: *mu and *cv initialized; the calling thread holds an exclusive lock on *mu. */ -GPR_API int gpr_cv_wait(gpr_cv *cv, gpr_mu *mu, gpr_timespec abs_deadline); +GPRAPI int gpr_cv_wait(gpr_cv *cv, gpr_mu *mu, gpr_timespec abs_deadline); /* If any threads are waiting on *cv, wake at least one. Clients may treat this as an optimization of gpr_cv_broadcast() for use in the case where waking more than one waiter is not useful. Requires: *cv initialized. */ -GPR_API void gpr_cv_signal(gpr_cv *cv); +GPRAPI void gpr_cv_signal(gpr_cv *cv); /* Wake all threads waiting on *cv. Requires: *cv initialized. */ -GPR_API void gpr_cv_broadcast(gpr_cv *cv); +GPRAPI void gpr_cv_broadcast(gpr_cv *cv); /* --- One-time initialization --- @@ -141,7 +141,7 @@ GPR_API void gpr_cv_broadcast(gpr_cv *cv); If multiple threads call gpr_once() on the same gpr_once instance, one of them will call (*init_routine)(), and the others will block until that call finishes.*/ -GPR_API void gpr_once_init(gpr_once *once, void (*init_routine)(void)); +GPRAPI void gpr_once_init(gpr_once *once, void (*init_routine)(void)); /* --- One-time event notification --- @@ -151,43 +151,43 @@ GPR_API void gpr_once_init(gpr_once *once, void (*init_routine)(void)); It requires no destruction. */ /* Initialize *ev. */ -GPR_API void gpr_event_init(gpr_event *ev); +GPRAPI void gpr_event_init(gpr_event *ev); /* Set *ev so that gpr_event_get() and gpr_event_wait() will return value. Requires: *ev initialized; value != NULL; no prior or concurrent calls to gpr_event_set(ev, ...) since initialization. */ -GPR_API void gpr_event_set(gpr_event *ev, void *value); +GPRAPI void gpr_event_set(gpr_event *ev, void *value); /* Return the value set by gpr_event_set(ev, ...), or NULL if no such call has completed. If the result is non-NULL, all operations that occurred prior to the gpr_event_set(ev, ...) set will be visible after this call returns. Requires: *ev initialized. This operation is faster than acquiring a mutex on most platforms. */ -GPR_API void *gpr_event_get(gpr_event *ev); +GPRAPI void *gpr_event_get(gpr_event *ev); /* Wait until *ev is set by gpr_event_set(ev, ...), or abs_deadline is exceeded, then return gpr_event_get(ev). Requires: *ev initialized. Use abs_deadline==gpr_inf_future for no deadline. When the event has been signalled before the call, this operation is faster than acquiring a mutex on most platforms. */ -GPR_API void *gpr_event_wait(gpr_event *ev, gpr_timespec abs_deadline); +GPRAPI void *gpr_event_wait(gpr_event *ev, gpr_timespec abs_deadline); /* --- Reference counting --- These calls act on the type gpr_refcount. It requires no destruction. */ /* Initialize *r to value n. */ -GPR_API void gpr_ref_init(gpr_refcount *r, int n); +GPRAPI void gpr_ref_init(gpr_refcount *r, int n); /* Increment the reference count *r. Requires *r initialized. */ -GPR_API void gpr_ref(gpr_refcount *r); +GPRAPI void gpr_ref(gpr_refcount *r); /* Increment the reference count *r by n. Requires *r initialized, n > 0. */ -GPR_API void gpr_refn(gpr_refcount *r, int n); +GPRAPI void gpr_refn(gpr_refcount *r, int n); /* Decrement the reference count *r and return non-zero iff it has reached zero. . Requires *r initialized. */ -GPR_API int gpr_unref(gpr_refcount *r); +GPRAPI int gpr_unref(gpr_refcount *r); /* --- Stats counters --- @@ -198,13 +198,13 @@ GPR_API int gpr_unref(gpr_refcount *r); synchronize other events. */ /* Initialize *c to the value n. */ -GPR_API void gpr_stats_init(gpr_stats_counter *c, intptr_t n); +GPRAPI void gpr_stats_init(gpr_stats_counter *c, intptr_t n); /* *c += inc. Requires: *c initialized. */ -GPR_API void gpr_stats_inc(gpr_stats_counter *c, intptr_t inc); +GPRAPI void gpr_stats_inc(gpr_stats_counter *c, intptr_t inc); /* Return *c. Requires: *c initialized. */ -GPR_API intptr_t gpr_stats_read(const gpr_stats_counter *c); +GPRAPI intptr_t gpr_stats_read(const gpr_stats_counter *c); /* ==================Example use of interface=================== A producer-consumer queue of up to N integers, |