From 554e2f0874baddf957388add4f7868fb18083ddc Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Sun, 15 Mar 2015 20:10:09 -0400 Subject: [PATCH] whitespace: Strictly conform to C namespacing rules. --- include/ck_array.h | 6 +++--- include/ck_backoff.h | 6 +++--- include/ck_barrier.h | 6 +++--- include/ck_bitmap.h | 6 +++--- include/ck_brlock.h | 6 +++--- include/ck_bytelock.h | 6 +++--- include/ck_cc.h | 6 +++--- include/ck_cohort.h | 6 +++--- include/ck_elide.h | 16 ++++++++-------- include/ck_epoch.h | 6 +++--- include/ck_fifo.h | 6 +++--- include/ck_hp.h | 6 +++--- include/ck_hp_fifo.h | 6 +++--- include/ck_hp_stack.h | 6 +++--- include/ck_hs.h | 6 +++--- include/ck_ht.h | 10 +++++----- include/ck_malloc.h | 6 +++--- include/ck_md.h.in | 6 +++--- include/ck_pflock.h | 6 +++--- include/ck_pr.h | 6 +++--- include/ck_queue.h | 6 +++--- include/ck_rhs.h | 6 +++--- include/ck_ring.h | 6 +++--- include/ck_rwcohort.h | 6 +++--- include/ck_rwlock.h | 6 +++--- include/ck_sequence.h | 6 +++--- include/ck_spinlock.h | 6 +++--- include/ck_stack.h | 6 +++--- include/ck_swlock.h | 6 +++--- include/ck_tflock.h | 6 +++--- include/gcc/ck_cc.h | 6 +++--- include/gcc/ck_pr.h | 8 ++++---- include/gcc/ppc/ck_pr.h | 8 ++++---- include/gcc/ppc64/ck_pr.h | 8 ++++---- include/gcc/sparcv9/ck_pr.h | 8 ++++---- include/gcc/x86/ck_pr.h | 8 ++++---- include/gcc/x86_64/ck_pr.h | 8 ++++---- include/gcc/x86_64/ck_pr_rtm.h | 8 ++++---- include/spinlock/anderson.h | 6 +++--- include/spinlock/cas.h | 6 +++--- include/spinlock/clh.h | 6 +++--- include/spinlock/dec.h | 6 +++--- include/spinlock/fas.h | 6 +++--- include/spinlock/hclh.h | 6 +++--- include/spinlock/mcs.h | 6 +++--- include/spinlock/ticket.h | 6 +++--- src/ck_ht.c | 2 +- src/ck_ht_hash.h | 6 +++--- 48 files changed, 156 insertions(+), 156 deletions(-) diff --git a/include/ck_array.h b/include/ck_array.h index 69eb4d0..6f901ea 100644 --- a/include/ck_array.h +++ b/include/ck_array.h @@ -25,8 +25,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_ARRAY_H -#define _CK_ARRAY_H +#ifndef CK_ARRAY_H +#define CK_ARRAY_H #include #include @@ -97,4 +97,4 @@ ck_array_initialized(struct ck_array *array) ((*b) = (a)->active->values[_ck_i], 1); \ _ck_i++) -#endif /* _CK_ARRAY_H */ +#endif /* CK_ARRAY_H */ diff --git a/include/ck_backoff.h b/include/ck_backoff.h index 2861c03..82a4f21 100644 --- a/include/ck_backoff.h +++ b/include/ck_backoff.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_BACKOFF_H -#define _CK_BACKOFF_H +#ifndef CK_BACKOFF_H +#define CK_BACKOFF_H #include #include @@ -54,4 +54,4 @@ ck_backoff_eb(unsigned int *c) return; } -#endif /* _CK_BACKOFF_H */ +#endif /* CK_BACKOFF_H */ diff --git a/include/ck_barrier.h b/include/ck_barrier.h index 1013973..d4c12ca 100644 --- a/include/ck_barrier.h +++ b/include/ck_barrier.h @@ -25,8 +25,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_BARRIER_H -#define _CK_BARRIER_H +#ifndef CK_BARRIER_H +#define CK_BARRIER_H #include @@ -161,4 +161,4 @@ void ck_barrier_mcs_init(ck_barrier_mcs_t *, unsigned int); void ck_barrier_mcs_subscribe(ck_barrier_mcs_t *, ck_barrier_mcs_state_t *); void ck_barrier_mcs(ck_barrier_mcs_t *, ck_barrier_mcs_state_t *); -#endif /* _CK_BARRIER_H */ +#endif /* CK_BARRIER_H */ diff --git a/include/ck_bitmap.h b/include/ck_bitmap.h index 5f229f2..31ad11b 100644 --- a/include/ck_bitmap.h +++ b/include/ck_bitmap.h @@ -26,8 +26,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_BITMAP_H -#define _CK_BITMAP_H +#ifndef CK_BITMAP_H +#define CK_BITMAP_H #include #include @@ -510,4 +510,4 @@ non_zero: return true; } -#endif /* _CK_BITMAP_H */ +#endif /* CK_BITMAP_H */ diff --git a/include/ck_brlock.h b/include/ck_brlock.h index bbfc4e5..e2f910a 100644 --- a/include/ck_brlock.h +++ b/include/ck_brlock.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_BRLOCK_H -#define _CK_BRLOCK_H +#ifndef CK_BRLOCK_H +#define CK_BRLOCK_H /* * Big reader spinlocks provide cache-local contention-free read @@ -276,4 +276,4 @@ ck_brlock_read_unlock(struct ck_brlock_reader *reader) return; } -#endif /* _CK_BRLOCK_H */ +#endif /* CK_BRLOCK_H */ diff --git a/include/ck_bytelock.h b/include/ck_bytelock.h index 06c5c0e..200069c 100644 --- a/include/ck_bytelock.h +++ b/include/ck_bytelock.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_BYTELOCK_H -#define _CK_BYTELOCK_H +#ifndef CK_BYTELOCK_H +#define CK_BYTELOCK_H /* * The implementations here are derived from the work described in: @@ -183,4 +183,4 @@ ck_bytelock_read_unlock(struct ck_bytelock *bytelock, unsigned int slot) return; } -#endif /* _CK_BYTELOCK_H */ +#endif /* CK_BYTELOCK_H */ diff --git a/include/ck_cc.h b/include/ck_cc.h index 75dd92a..427a152 100644 --- a/include/ck_cc.h +++ b/include/ck_cc.h @@ -25,8 +25,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_CC_H -#define _CK_CC_H +#ifndef CK_CC_H +#define CK_CC_H #if defined(__GNUC__) || defined(__SUNPRO_C) #include "gcc/ck_cc.h" @@ -152,4 +152,4 @@ ck_cc_popcount(unsigned int x) } #endif -#endif /* _CK_CC_H */ +#endif /* CK_CC_H */ diff --git a/include/ck_cohort.h b/include/ck_cohort.h index 719c059..7a7a136 100644 --- a/include/ck_cohort.h +++ b/include/ck_cohort.h @@ -25,8 +25,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_COHORT_H -#define _CK_COHORT_H +#ifndef CK_COHORT_H +#define CK_COHORT_H /* * This is an implementation of lock cohorts as described in: @@ -158,4 +158,4 @@ enum ck_cohort_state { .local_pass_limit = CK_COHORT_DEFAULT_LOCAL_PASS_LIMIT \ } -#endif /* _CK_COHORT_H */ +#endif /* CK_COHORT_H */ diff --git a/include/ck_elide.h b/include/ck_elide.h index a6aca22..455bf10 100644 --- a/include/ck_elide.h +++ b/include/ck_elide.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_ELIDE_H -#define _CK_ELIDE_H +#ifndef CK_ELIDE_H +#define CK_ELIDE_H /* * As RTM is currently only supported on TSO x86 architectures, @@ -88,7 +88,7 @@ enum _ck_elide_hint { CK_ELIDE_HINT_STOP }; -#define _CK_ELIDE_LOCK_BUSY 0xFF +#define CK_ELIDE_LOCK_BUSY 0xFF static enum _ck_elide_hint _ck_elide_fallback(int *retry, @@ -105,7 +105,7 @@ _ck_elide_fallback(int *retry, return CK_ELIDE_HINT_STOP; if (status & CK_PR_RTM_EXPLICIT) { - if (CK_PR_RTM_CODE(status) == _CK_ELIDE_LOCK_BUSY) { + if (CK_PR_RTM_CODE(status) == CK_ELIDE_LOCK_BUSY) { st->skip = c->skip_busy; *retry = c->retry_busy; return CK_ELIDE_HINT_SPIN; @@ -159,7 +159,7 @@ _ck_elide_fallback(int *retry, unsigned int status = ck_pr_rtm_begin(); \ if (status == CK_PR_RTM_STARTED) { \ if (L_P(lock) == true) \ - ck_pr_rtm_abort(_CK_ELIDE_LOCK_BUSY); \ + ck_pr_rtm_abort(CK_ELIDE_LOCK_BUSY); \ \ return; \ } \ @@ -211,7 +211,7 @@ _ck_elide_fallback(int *retry, } \ \ if (L_P(lock) == true) \ - ck_pr_rtm_abort(_CK_ELIDE_LOCK_BUSY); \ + ck_pr_rtm_abort(CK_ELIDE_LOCK_BUSY); \ \ return; \ } \ @@ -237,7 +237,7 @@ _ck_elide_fallback(int *retry, return false; \ \ if (TL_P(lock) == true) \ - ck_pr_rtm_abort(_CK_ELIDE_LOCK_BUSY); \ + ck_pr_rtm_abort(CK_ELIDE_LOCK_BUSY); \ \ return true; \ } @@ -318,4 +318,4 @@ _ck_elide_fallback(int *retry, #define CK_ELIDE_UNLOCK_ADAPTIVE(NAME, STAT, LOCK) \ ck_elide_##NAME##_unlock_adaptive(STAT, LOCK) -#endif /* _CK_ELIDE_H */ +#endif /* CK_ELIDE_H */ diff --git a/include/ck_epoch.h b/include/ck_epoch.h index 72b2307..2597c29 100644 --- a/include/ck_epoch.h +++ b/include/ck_epoch.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_EPOCH_H -#define _CK_EPOCH_H +#ifndef CK_EPOCH_H +#define CK_EPOCH_H /* * The implementation here is inspired from the work described in: @@ -159,4 +159,4 @@ void ck_epoch_synchronize(ck_epoch_t *, ck_epoch_record_t *); void ck_epoch_barrier(ck_epoch_t *, ck_epoch_record_t *); void ck_epoch_reclaim(ck_epoch_record_t *); -#endif /* _CK_EPOCH_H */ +#endif /* CK_EPOCH_H */ diff --git a/include/ck_fifo.h b/include/ck_fifo.h index c75a9fb..7db5cdf 100644 --- a/include/ck_fifo.h +++ b/include/ck_fifo.h @@ -25,8 +25,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_FIFO_H -#define _CK_FIFO_H +#ifndef CK_FIFO_H +#define CK_FIFO_H #include #include @@ -475,4 +475,4 @@ ck_fifo_mpmc_trydequeue(struct ck_fifo_mpmc *fifo, #endif /* CK_F_FIFO_MPMC */ #endif /* CK_F_PR_CAS_PTR_2 */ -#endif /* _CK_FIFO_H */ +#endif /* CK_FIFO_H */ diff --git a/include/ck_hp.h b/include/ck_hp.h index bbd98e7..d032f72 100644 --- a/include/ck_hp.h +++ b/include/ck_hp.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_HP_H -#define _CK_HP_H +#ifndef CK_HP_H +#define CK_HP_H #include #include @@ -103,4 +103,4 @@ void ck_hp_free(ck_hp_record_t *, ck_hp_hazard_t *, void *, void *); void ck_hp_retire(ck_hp_record_t *, ck_hp_hazard_t *, void *, void *); void ck_hp_purge(ck_hp_record_t *); -#endif /* _CK_HP_H */ +#endif /* CK_HP_H */ diff --git a/include/ck_hp_fifo.h b/include/ck_hp_fifo.h index 9d4c682..980f896 100644 --- a/include/ck_hp_fifo.h +++ b/include/ck_hp_fifo.h @@ -25,8 +25,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_HP_FIFO_H -#define _CK_HP_FIFO_H +#ifndef CK_HP_FIFO_H +#define CK_HP_FIFO_H #include #include @@ -218,4 +218,4 @@ ck_hp_fifo_trydequeue_mpmc(ck_hp_record_t *record, (entry) != NULL && ((T) = (entry)->next, 1); \ (entry) = (T)) -#endif /* _CK_HP_FIFO_H */ +#endif /* CK_HP_FIFO_H */ diff --git a/include/ck_hp_stack.h b/include/ck_hp_stack.h index b41297b..fdbfdac 100644 --- a/include/ck_hp_stack.h +++ b/include/ck_hp_stack.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_HP_STACK_H -#define _CK_HP_STACK_H +#ifndef CK_HP_STACK_H +#define CK_HP_STACK_H #include #include @@ -110,4 +110,4 @@ leave: return false; } -#endif /* _CK_HP_STACK_H */ +#endif /* CK_HP_STACK_H */ diff --git a/include/ck_hs.h b/include/ck_hs.h index 041b4fe..eeaf428 100644 --- a/include/ck_hs.h +++ b/include/ck_hs.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_HS_H -#define _CK_HS_H +#ifndef CK_HS_H +#define CK_HS_H #include #include @@ -131,4 +131,4 @@ bool ck_hs_reset(ck_hs_t *); bool ck_hs_reset_size(ck_hs_t *, unsigned long); void ck_hs_stat(ck_hs_t *, struct ck_hs_stat *); -#endif /* _CK_HS_H */ +#endif /* CK_HS_H */ diff --git a/include/ck_ht.h b/include/ck_ht.h index df032ee..41594c6 100644 --- a/include/ck_ht.h +++ b/include/ck_ht.h @@ -24,12 +24,12 @@ * SUCH DAMAGE. */ -#ifndef _CK_HT_H -#define _CK_HT_H +#ifndef CK_HT_H +#define CK_HT_H -#ifndef _CK_HT_IM +#ifndef CK_HT_IM #warning ck_ht is deprecated, see ck_hm, ck_hs or ck_rhs. -#endif /* !_CK_HT_IM */ +#endif /* !CK_HT_IM */ #include @@ -262,4 +262,4 @@ bool ck_ht_reset_size_spmc(ck_ht_t *, uint64_t); uint64_t ck_ht_count(ck_ht_t *); #endif /* CK_F_PR_LOAD_64 && CK_F_PR_STORE_64 */ -#endif /* _CK_HT_H */ +#endif /* CK_HT_H */ diff --git a/include/ck_malloc.h b/include/ck_malloc.h index 3df32f4..eaf4c97 100644 --- a/include/ck_malloc.h +++ b/include/ck_malloc.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_MALLOC_H -#define _CK_MALLOC_H +#ifndef CK_MALLOC_H +#define CK_MALLOC_H #include #include @@ -36,4 +36,4 @@ struct ck_malloc { void (*free)(void *, size_t, bool); }; -#endif /* _CK_MALLOC_H */ +#endif /* CK_MALLOC_H */ diff --git a/include/ck_md.h.in b/include/ck_md.h.in index 4449cf8..7817aa4 100644 --- a/include/ck_md.h.in +++ b/include/ck_md.h.in @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_MD_H -#define _CK_MD_H +#ifndef CK_MD_H +#define CK_MD_H #ifndef CK_MD_CACHELINE #define CK_MD_CACHELINE (64) @@ -51,4 +51,4 @@ #define @MM@ #endif /* @MM@ */ -#endif /* _CK_MD_H */ +#endif /* CK_MD_H */ diff --git a/include/ck_pflock.h b/include/ck_pflock.h index 3474127..2809ad1 100644 --- a/include/ck_pflock.h +++ b/include/ck_pflock.h @@ -25,8 +25,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_PFLOCK_H -#define _CK_PFLOCK_H +#ifndef CK_PFLOCK_H +#define CK_PFLOCK_H /* * This is an implementation of phase-fair locks derived from the work @@ -139,4 +139,4 @@ leave: return; } -#endif /* _CK_PFLOCK_H */ +#endif /* CK_PFLOCK_H */ diff --git a/include/ck_pr.h b/include/ck_pr.h index f5533bb..20330a9 100644 --- a/include/ck_pr.h +++ b/include/ck_pr.h @@ -25,8 +25,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_PR_H -#define _CK_PR_H +#ifndef CK_PR_H +#define CK_PR_H #include #include @@ -1159,4 +1159,4 @@ CK_PR_FAS_S(8, uint8_t) #undef CK_PR_FAA #undef CK_PR_FAS -#endif /* _CK_PR_H */ +#endif /* CK_PR_H */ diff --git a/include/ck_queue.h b/include/ck_queue.h index 6603081..fb92532 100644 --- a/include/ck_queue.h +++ b/include/ck_queue.h @@ -56,8 +56,8 @@ * $FreeBSD: release/9.0.0/sys/sys/queue.h 221843 2011-05-13 15:49:23Z mdf $ */ -#ifndef _CK_QUEUE_H_ -#define _CK_QUEUE_H_ +#ifndef CK_QUEUE_H +#define CK_QUEUE_H #include @@ -414,4 +414,4 @@ struct { \ swap_tmp->field.le_prev = &(head2)->lh_first; \ } while (0) -#endif /* _CK_QUEUE_H */ +#endif /* CK_QUEUE_H */ diff --git a/include/ck_rhs.h b/include/ck_rhs.h index f1d2a53..a9ae11f 100644 --- a/include/ck_rhs.h +++ b/include/ck_rhs.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_RHS_H -#define _CK_RHS_H +#ifndef CK_RHS_H +#define CK_RHS_H #include #include @@ -129,4 +129,4 @@ bool ck_rhs_reset(ck_rhs_t *); bool ck_rhs_reset_size(ck_rhs_t *, unsigned long); void ck_rhs_stat(ck_rhs_t *, struct ck_rhs_stat *); -#endif /* _CK_RHS_H */ +#endif /* CK_RHS_H */ diff --git a/include/ck_ring.h b/include/ck_ring.h index 6a414b8..a4e84c8 100644 --- a/include/ck_ring.h +++ b/include/ck_ring.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_RING_H -#define _CK_RING_H +#ifndef CK_RING_H +#define CK_RING_H #include #include @@ -431,4 +431,4 @@ ck_ring_dequeue_spmc_##name(struct ck_ring *a, \ #define CK_RING_DEQUEUE_SPMC(name, a, b, c) \ ck_ring_dequeue_spmc_##name(a, b, c) -#endif /* _CK_RING_H */ +#endif /* CK_RING_H */ diff --git a/include/ck_rwcohort.h b/include/ck_rwcohort.h index 9fd25af..eb6d14b 100644 --- a/include/ck_rwcohort.h +++ b/include/ck_rwcohort.h @@ -25,8 +25,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_RWCOHORT_H -#define _CK_RWCOHORT_H +#ifndef CK_RWCOHORT_H +#define CK_RWCOHORT_H /* * This is an implementation of NUMA-aware reader-writer locks as described in: @@ -314,4 +314,4 @@ .read_counter = 0, \ } -#endif /* _CK_RWCOHORT_H */ +#endif /* CK_RWCOHORT_H */ diff --git a/include/ck_rwlock.h b/include/ck_rwlock.h index 3824609..4488117 100644 --- a/include/ck_rwlock.h +++ b/include/ck_rwlock.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_RWLOCK_H -#define _CK_RWLOCK_H +#ifndef CK_RWLOCK_H +#define CK_RWLOCK_H #include #include @@ -294,4 +294,4 @@ ck_rwlock_recursive_read_unlock(ck_rwlock_recursive_t *rw) return; } -#endif /* _CK_RWLOCK_H */ +#endif /* CK_RWLOCK_H */ diff --git a/include/ck_sequence.h b/include/ck_sequence.h index 733a7d0..46ceb3b 100644 --- a/include/ck_sequence.h +++ b/include/ck_sequence.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_SEQUENCE_H -#define _CK_SEQUENCE_H +#ifndef CK_SEQUENCE_H +#define CK_SEQUENCE_H #include #include @@ -122,4 +122,4 @@ ck_sequence_write_end(struct ck_sequence *sq) return; } -#endif /* _CK_SEQUENCE_H */ +#endif /* CK_SEQUENCE_H */ diff --git a/include/ck_spinlock.h b/include/ck_spinlock.h index 94ec290..e9585f2 100644 --- a/include/ck_spinlock.h +++ b/include/ck_spinlock.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_SPINLOCK_H -#define _CK_SPINLOCK_H +#ifndef CK_SPINLOCK_H +#define CK_SPINLOCK_H #include "spinlock/anderson.h" #include "spinlock/cas.h" @@ -58,4 +58,4 @@ CK_ELIDE_PROTOTYPE(ck_spinlock, ck_spinlock_t, CK_ELIDE_TRYLOCK_PROTOTYPE(ck_spinlock, ck_spinlock_t, ck_spinlock_locked, ck_spinlock_trylock) -#endif /* _CK_SPINLOCK_H */ +#endif /* CK_SPINLOCK_H */ diff --git a/include/ck_stack.h b/include/ck_stack.h index 0df4cc8..a7f11de 100644 --- a/include/ck_stack.h +++ b/include/ck_stack.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_STACK_H -#define _CK_STACK_H +#ifndef CK_STACK_H +#define CK_STACK_H #include #include @@ -354,4 +354,4 @@ ck_stack_init(struct ck_stack *stack) (entry) != NULL && ((T) = (entry)->next, 1); \ (entry) = (T)) -#endif /* _CK_STACK_H */ +#endif /* CK_STACK_H */ diff --git a/include/ck_swlock.h b/include/ck_swlock.h index ef660aa..c2c99e6 100644 --- a/include/ck_swlock.h +++ b/include/ck_swlock.h @@ -25,8 +25,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_SWLOCK_H -#define _CK_SWLOCK_H +#ifndef CK_SWLOCK_H +#define CK_SWLOCK_H #include #include @@ -214,4 +214,4 @@ CK_ELIDE_PROTOTYPE(ck_swlock_read, ck_swlock_t, ck_swlock_locked_writer, ck_swlock_read_lock, ck_swlock_locked_reader, ck_swlock_read_unlock) -#endif /* _CK_SWLOCK_H */ +#endif /* CK_SWLOCK_H */ diff --git a/include/ck_tflock.h b/include/ck_tflock.h index 3bb43d5..7f15040 100644 --- a/include/ck_tflock.h +++ b/include/ck_tflock.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_TFLOCK_TICKET_H -#define _CK_TFLOCK_TICKET_H +#ifndef CK_TFLOCK_TICKET_H +#define CK_TFLOCK_TICKET_H /* * This is an implementation of task-fair locks derived from the work @@ -130,4 +130,4 @@ ck_tflock_ticket_read_unlock(struct ck_tflock_ticket *lock) return; } -#endif /* _CK_TFLOCK_TICKET_H */ +#endif /* CK_TFLOCK_TICKET_H */ diff --git a/include/gcc/ck_cc.h b/include/gcc/ck_cc.h index 129c1b1..e16c6ff 100644 --- a/include/gcc/ck_cc.h +++ b/include/gcc/ck_cc.h @@ -25,8 +25,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_GCC_CC_H -#define _CK_GCC_CC_H +#ifndef CK_GCC_CC_H +#define CK_GCC_CC_H #include @@ -134,4 +134,4 @@ ck_cc_popcount(unsigned int x) return __builtin_popcount(x); } -#endif /* _CK_GCC_CC_H */ +#endif /* CK_GCC_CC_H */ diff --git a/include/gcc/ck_pr.h b/include/gcc/ck_pr.h index 6ebadd8..3233b27 100644 --- a/include/gcc/ck_pr.h +++ b/include/gcc/ck_pr.h @@ -24,10 +24,10 @@ * SUCH DAMAGE. */ -#ifndef _CK_PR_GCC_H -#define _CK_PR_GCC_H +#ifndef CK_PR_GCC_H +#define CK_PR_GCC_H -#ifndef _CK_PR_H +#ifndef CK_PR_H #error Do not include this file directly, use ck_pr.h #endif @@ -277,5 +277,5 @@ CK_PR_UNARY_S(8, uint8_t) #undef CK_PR_UNARY_S #undef CK_PR_UNARY #endif /* !CK_F_PR */ -#endif /* _CK_PR_GCC_H */ +#endif /* CK_PR_GCC_H */ diff --git a/include/gcc/ppc/ck_pr.h b/include/gcc/ppc/ck_pr.h index e74a886..3a4468e 100644 --- a/include/gcc/ppc/ck_pr.h +++ b/include/gcc/ppc/ck_pr.h @@ -25,10 +25,10 @@ * SUCH DAMAGE. */ -#ifndef _CK_PR_PPC_H -#define _CK_PR_PPC_H +#ifndef CK_PR_PPC_H +#define CK_PR_PPC_H -#ifndef _CK_PR_H +#ifndef CK_PR_H #error Do not include this file directly, use ck_pr.h #endif @@ -318,5 +318,5 @@ CK_PR_FAA(int, int, "w") #undef CK_PR_FAA -#endif /* _CK_PR_PPC_H */ +#endif /* CK_PR_PPC_H */ diff --git a/include/gcc/ppc64/ck_pr.h b/include/gcc/ppc64/ck_pr.h index 2876690..c59f415 100644 --- a/include/gcc/ppc64/ck_pr.h +++ b/include/gcc/ppc64/ck_pr.h @@ -24,10 +24,10 @@ * SUCH DAMAGE. */ -#ifndef _CK_PR_PPC64_H -#define _CK_PR_PPC64_H +#ifndef CK_PR_PPC64_H +#define CK_PR_PPC64_H -#ifndef _CK_PR_H +#ifndef CK_PR_H #error Do not include this file directly, use ck_pr.h #endif @@ -415,5 +415,5 @@ CK_PR_FAA(int, int, "w") #undef CK_PR_FAA -#endif /* _CK_PR_PPC64_H */ +#endif /* CK_PR_PPC64_H */ diff --git a/include/gcc/sparcv9/ck_pr.h b/include/gcc/sparcv9/ck_pr.h index 253c8ef..419a1f9 100644 --- a/include/gcc/sparcv9/ck_pr.h +++ b/include/gcc/sparcv9/ck_pr.h @@ -24,10 +24,10 @@ * SUCH DAMAGE. */ -#ifndef _CK_PR_SPARCV9_H -#define _CK_PR_SPARCV9_H +#ifndef CK_PR_SPARCV9_H +#define CK_PR_SPARCV9_H -#ifndef _CK_PR_H +#ifndef CK_PR_H #error Do not include this file directly, use ck_pr.h #endif @@ -221,5 +221,5 @@ CK_PR_FAS(32, uint32_t) #undef CK_PR_FAS -#endif /* _CK_PR_SPARCV9_H */ +#endif /* CK_PR_SPARCV9_H */ diff --git a/include/gcc/x86/ck_pr.h b/include/gcc/x86/ck_pr.h index 4c50744..f16b4b1 100644 --- a/include/gcc/x86/ck_pr.h +++ b/include/gcc/x86/ck_pr.h @@ -25,10 +25,10 @@ * SUCH DAMAGE. */ -#ifndef _CK_PR_X86_H -#define _CK_PR_X86_H +#ifndef CK_PR_X86_H +#define CK_PR_X86_H -#ifndef _CK_PR_H +#ifndef CK_PR_H #error Do not include this file directly, use ck_pr.h #endif @@ -384,5 +384,5 @@ CK_PR_GENERATE(btr) #undef CK_PR_GENERATE #undef CK_PR_BT -#endif /* _CK_PR_X86_H */ +#endif /* CK_PR_X86_H */ diff --git a/include/gcc/x86_64/ck_pr.h b/include/gcc/x86_64/ck_pr.h index 1a71d31..be22826 100644 --- a/include/gcc/x86_64/ck_pr.h +++ b/include/gcc/x86_64/ck_pr.h @@ -24,10 +24,10 @@ * SUCH DAMAGE. */ -#ifndef _CK_PR_X86_64_H -#define _CK_PR_X86_64_H +#ifndef CK_PR_X86_64_H +#define CK_PR_X86_64_H -#ifndef _CK_PR_H +#ifndef CK_PR_H #error Do not include this file directly, use ck_pr.h #endif @@ -561,5 +561,5 @@ CK_PR_GENERATE(btr) #undef CK_PR_GENERATE #undef CK_PR_BT -#endif /* _CK_PR_X86_64_H */ +#endif /* CK_PR_X86_64_H */ diff --git a/include/gcc/x86_64/ck_pr_rtm.h b/include/gcc/x86_64/ck_pr_rtm.h index 552de5a..bee63d9 100644 --- a/include/gcc/x86_64/ck_pr_rtm.h +++ b/include/gcc/x86_64/ck_pr_rtm.h @@ -40,10 +40,10 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef _CK_PR_X86_64_RTM_H -#define _CK_PR_X86_64_RTM_H +#ifndef CK_PR_X86_64_RTM_H +#define CK_PR_X86_64_RTM_H -#ifndef _CK_PR_X86_64_H +#ifndef CK_PR_X86_64_H #error Do not include this file directly, use ck_pr.h #endif @@ -105,5 +105,5 @@ ck_pr_rtm_test(void) return r; } -#endif /* _CK_PR_X86_64_RTM_H */ +#endif /* CK_PR_X86_64_RTM_H */ diff --git a/include/spinlock/anderson.h b/include/spinlock/anderson.h index 1386b18..e550583 100644 --- a/include/spinlock/anderson.h +++ b/include/spinlock/anderson.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_SPINLOCK_ANDERSON_H -#define _CK_SPINLOCK_ANDERSON_H +#ifndef CK_SPINLOCK_ANDERSON_H +#define CK_SPINLOCK_ANDERSON_H #include #include @@ -161,4 +161,4 @@ ck_spinlock_anderson_unlock(struct ck_spinlock_anderson *lock, return; } #endif /* CK_F_SPINLOCK_ANDERSON */ -#endif /* _CK_SPINLOCK_ANDERSON_H */ +#endif /* CK_SPINLOCK_ANDERSON_H */ diff --git a/include/spinlock/cas.h b/include/spinlock/cas.h index ca087e3..25ef896 100644 --- a/include/spinlock/cas.h +++ b/include/spinlock/cas.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_SPINLOCK_CAS_H -#define _CK_SPINLOCK_CAS_H +#ifndef CK_SPINLOCK_CAS_H +#define CK_SPINLOCK_CAS_H #include #include @@ -117,4 +117,4 @@ CK_ELIDE_TRYLOCK_PROTOTYPE(ck_spinlock_cas, ck_spinlock_cas_t, ck_spinlock_cas_locked, ck_spinlock_cas_trylock) #endif /* CK_F_SPINLOCK_CAS */ -#endif /* _CK_SPINLOCK_CAS_H */ +#endif /* CK_SPINLOCK_CAS_H */ diff --git a/include/spinlock/clh.h b/include/spinlock/clh.h index 768e771..f6950f0 100644 --- a/include/spinlock/clh.h +++ b/include/spinlock/clh.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_SPINLOCK_CLH_H -#define _CK_SPINLOCK_CLH_H +#ifndef CK_SPINLOCK_CLH_H +#define CK_SPINLOCK_CLH_H #include #include @@ -113,4 +113,4 @@ ck_spinlock_clh_unlock(struct ck_spinlock_clh **thread) return; } #endif /* CK_F_SPINLOCK_CLH */ -#endif /* _CK_SPINLOCK_CLH_H */ +#endif /* CK_SPINLOCK_CLH_H */ diff --git a/include/spinlock/dec.h b/include/spinlock/dec.h index 35f44c1..bc9f263 100644 --- a/include/spinlock/dec.h +++ b/include/spinlock/dec.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_SPINLOCK_DEC_H -#define _CK_SPINLOCK_DEC_H +#ifndef CK_SPINLOCK_DEC_H +#define CK_SPINLOCK_DEC_H #include #include @@ -139,4 +139,4 @@ CK_ELIDE_TRYLOCK_PROTOTYPE(ck_spinlock_dec, ck_spinlock_dec_t, ck_spinlock_dec_locked, ck_spinlock_dec_trylock) #endif /* CK_F_SPINLOCK_DEC */ -#endif /* _CK_SPINLOCK_DEC_H */ +#endif /* CK_SPINLOCK_DEC_H */ diff --git a/include/spinlock/fas.h b/include/spinlock/fas.h index 1774919..4841a7f 100644 --- a/include/spinlock/fas.h +++ b/include/spinlock/fas.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_SPINLOCK_FAS_H -#define _CK_SPINLOCK_FAS_H +#ifndef CK_SPINLOCK_FAS_H +#define CK_SPINLOCK_FAS_H #include #include @@ -114,4 +114,4 @@ CK_ELIDE_TRYLOCK_PROTOTYPE(ck_spinlock_fas, ck_spinlock_fas_t, ck_spinlock_fas_locked, ck_spinlock_fas_trylock) #endif /* CK_F_SPINLOCK_FAS */ -#endif /* _CK_SPINLOCK_FAS_H */ +#endif /* CK_SPINLOCK_FAS_H */ diff --git a/include/spinlock/hclh.h b/include/spinlock/hclh.h index 3e94072..3b61ec1 100644 --- a/include/spinlock/hclh.h +++ b/include/spinlock/hclh.h @@ -25,8 +25,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_SPINLOCK_HCLH_H -#define _CK_SPINLOCK_HCLH_H +#ifndef CK_SPINLOCK_HCLH_H +#define CK_SPINLOCK_HCLH_H #include #include @@ -141,4 +141,4 @@ ck_spinlock_hclh_unlock(struct ck_spinlock_hclh **thread) return; } #endif /* CK_F_SPINLOCK_HCLH */ -#endif /* _CK_SPINLOCK_HCLH_H */ +#endif /* CK_SPINLOCK_HCLH_H */ diff --git a/include/spinlock/mcs.h b/include/spinlock/mcs.h index 066274e..6b27b8f 100644 --- a/include/spinlock/mcs.h +++ b/include/spinlock/mcs.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_SPINLOCK_MCS_H -#define _CK_SPINLOCK_MCS_H +#ifndef CK_SPINLOCK_MCS_H +#define CK_SPINLOCK_MCS_H #include #include @@ -145,4 +145,4 @@ ck_spinlock_mcs_unlock(struct ck_spinlock_mcs **queue, struct ck_spinlock_mcs *n return; } #endif /* CK_F_SPINLOCK_MCS */ -#endif /* _CK_SPINLOCK_MCS_H */ +#endif /* CK_SPINLOCK_MCS_H */ diff --git a/include/spinlock/ticket.h b/include/spinlock/ticket.h index de68851..d0286d5 100644 --- a/include/spinlock/ticket.h +++ b/include/spinlock/ticket.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_SPINLOCK_TICKET_H -#define _CK_SPINLOCK_TICKET_H +#ifndef CK_SPINLOCK_TICKET_H +#define CK_SPINLOCK_TICKET_H #include #include @@ -294,4 +294,4 @@ CK_ELIDE_TRYLOCK_PROTOTYPE(ck_spinlock_ticket, ck_spinlock_ticket_t, ck_spinlock_ticket_locked, ck_spinlock_ticket_trylock) #endif /* CK_F_SPINLOCK_TICKET */ -#endif /* _CK_SPINLOCK_TICKET_H */ +#endif /* CK_SPINLOCK_TICKET_H */ diff --git a/src/ck_ht.c b/src/ck_ht.c index 80a3bfe..587193c 100644 --- a/src/ck_ht.c +++ b/src/ck_ht.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. */ -#define _CK_HT_IM +#define CK_HT_IM #include #ifdef CK_F_HT diff --git a/src/ck_ht_hash.h b/src/ck_ht_hash.h index 08614a7..61b51ca 100644 --- a/src/ck_ht_hash.h +++ b/src/ck_ht_hash.h @@ -24,8 +24,8 @@ * SUCH DAMAGE. */ -#ifndef _CK_HT_HASH_H -#define _CK_HT_HASH_H +#ifndef CK_HT_HASH_H +#define CK_HT_HASH_H /* * This is the Murmur hash written by Austin Appleby. @@ -266,4 +266,4 @@ static inline uint64_t MurmurHash64B ( const void * key, int len, uint64_t seed return h; } -#endif /* _CK_HT_HASH_H */ +#endif /* CK_HT_HASH_H */