diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2011-09-04 19:29:36 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2011-09-04 19:29:36 -0700 |
commit | 621c0cdcb5efc4f7c2382031becded018ef0b62b (patch) | |
tree | d6af78ef0872c9db0f48c99e6c93b8d4c43fa689 /upb/atomic.h | |
parent | 8f2758dda2ba12b78ae8f8c7170decc5e88dd28c (diff) |
Const invasion: large parts of upb made const-correct.
Diffstat (limited to 'upb/atomic.h')
-rw-r--r-- | upb/atomic.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/upb/atomic.h b/upb/atomic.h index e82ad8f..2478fe4 100644 --- a/upb/atomic.h +++ b/upb/atomic.h @@ -130,11 +130,11 @@ INLINE bool upb_atomic_only(upb_atomic_t *a) { typedef struct { } upb_rwlock_t; -INLINE void upb_rwlock_init(upb_rwlock_t *l) { (void)l; } -INLINE void upb_rwlock_destroy(upb_rwlock_t *l) { (void)l; } -INLINE void upb_rwlock_rdlock(upb_rwlock_t *l) { (void)l; } -INLINE void upb_rwlock_wrlock(upb_rwlock_t *l) { (void)l; } -INLINE void upb_rwlock_unlock(upb_rwlock_t *l) { (void)l; } +INLINE void upb_rwlock_init(const upb_rwlock_t *l) { (void)l; } +INLINE void upb_rwlock_destroy(const upb_rwlock_t *l) { (void)l; } +INLINE void upb_rwlock_rdlock(const upb_rwlock_t *l) { (void)l; } +INLINE void upb_rwlock_wrlock(const upb_rwlock_t *l) { (void)l; } +INLINE void upb_rwlock_unlock(const upb_rwlock_t *l) { (void)l; } #elif defined(UPB_USE_PTHREADS) @@ -144,27 +144,27 @@ typedef struct { pthread_rwlock_t lock; } upb_rwlock_t; -INLINE void upb_rwlock_init(upb_rwlock_t *l) { +INLINE void upb_rwlock_init(const upb_rwlock_t *l) { /* TODO: check return value. */ pthread_rwlock_init(&l->lock, NULL); } -INLINE void upb_rwlock_destroy(upb_rwlock_t *l) { +INLINE void upb_rwlock_destroy(const upb_rwlock_t *l) { /* TODO: check return value. */ pthread_rwlock_destroy(&l->lock); } -INLINE void upb_rwlock_rdlock(upb_rwlock_t *l) { +INLINE void upb_rwlock_rdlock(const upb_rwlock_t *l) { /* TODO: check return value. */ pthread_rwlock_rdlock(&l->lock); } -INLINE void upb_rwlock_wrlock(upb_rwlock_t *l) { +INLINE void upb_rwlock_wrlock(const upb_rwlock_t *l) { /* TODO: check return value. */ pthread_rwlock_wrlock(&l->lock); } -INLINE void upb_rwlock_unlock(upb_rwlock_t *l) { +INLINE void upb_rwlock_unlock(const upb_rwlock_t *l) { /* TODO: check return value. */ pthread_rwlock_unlock(&l->lock); } |