whitespace: Various style changes.

ck_pring
Samy Al Bahra 12 years ago
parent b4e9045c9b
commit 0598307186

@ -45,8 +45,7 @@ typedef struct ck_barrier_centralized_state ck_barrier_centralized_state_t;
#define CK_BARRIER_CENTRALIZED_STATE_INITIALIZER {0} #define CK_BARRIER_CENTRALIZED_STATE_INITIALIZER {0}
void ck_barrier_centralized(ck_barrier_centralized_t *, void ck_barrier_centralized(ck_barrier_centralized_t *,
ck_barrier_centralized_state_t *, ck_barrier_centralized_state_t *, unsigned int);
unsigned int);
struct ck_barrier_combining_group { struct ck_barrier_combining_group {
unsigned int k; unsigned int k;
@ -75,8 +74,7 @@ typedef struct ck_barrier_combining ck_barrier_combining_t;
void ck_barrier_combining_init(ck_barrier_combining_t *, ck_barrier_combining_group_t *); void ck_barrier_combining_init(ck_barrier_combining_t *, ck_barrier_combining_group_t *);
void ck_barrier_combining_group_init(ck_barrier_combining_t *, void ck_barrier_combining_group_init(ck_barrier_combining_t *,
ck_barrier_combining_group_t *, ck_barrier_combining_group_t *, unsigned int);
unsigned int);
void ck_barrier_combining(ck_barrier_combining_t *, void ck_barrier_combining(ck_barrier_combining_t *,
ck_barrier_combining_group_t *, ck_barrier_combining_group_t *,
@ -95,6 +93,7 @@ struct ck_barrier_dissemination {
struct ck_barrier_dissemination_flag *flags[2]; struct ck_barrier_dissemination_flag *flags[2];
}; };
typedef struct ck_barrier_dissemination ck_barrier_dissemination_t; typedef struct ck_barrier_dissemination ck_barrier_dissemination_t;
struct ck_barrier_dissemination_state { struct ck_barrier_dissemination_state {
int parity; int parity;
unsigned int sense; unsigned int sense;
@ -103,8 +102,7 @@ struct ck_barrier_dissemination_state {
typedef struct ck_barrier_dissemination_state ck_barrier_dissemination_state_t; typedef struct ck_barrier_dissemination_state ck_barrier_dissemination_state_t;
void ck_barrier_dissemination_init(ck_barrier_dissemination_t *, void ck_barrier_dissemination_init(ck_barrier_dissemination_t *,
ck_barrier_dissemination_flag_t **, ck_barrier_dissemination_flag_t **, unsigned int);
unsigned int);
void ck_barrier_dissemination_subscribe(ck_barrier_dissemination_t *, void ck_barrier_dissemination_subscribe(ck_barrier_dissemination_t *,
ck_barrier_dissemination_state_t *); ck_barrier_dissemination_state_t *);

@ -104,14 +104,14 @@
producer = ck_pr_load_uint(&ring->p_tail); \ producer = ck_pr_load_uint(&ring->p_tail); \
\ \
if (consumer == producer) \ if (consumer == producer) \
return (false); \ return false; \
\ \
ck_pr_fence_load(); \ ck_pr_fence_load(); \
*data = ring->ring[consumer & mask]; \ *data = ring->ring[consumer & mask]; \
ck_pr_fence_store(); \ ck_pr_fence_store(); \
ck_pr_store_uint(&ring->c_head, consumer + 1); \ ck_pr_store_uint(&ring->c_head, consumer + 1); \
\ \
return (true); \ return true; \
} \ } \
CK_CC_INLINE static bool \ CK_CC_INLINE static bool \
ck_ring_enqueue_spmc_##name(struct ck_ring_##name *ring, void *entry) \ ck_ring_enqueue_spmc_##name(struct ck_ring_##name *ring, void *entry) \

@ -681,3 +681,4 @@ ck_spinlock_clh_unlock(struct ck_spinlock_clh **thread)
#endif /* CK_F_SPINLOCK_CLH */ #endif /* CK_F_SPINLOCK_CLH */
#endif /* _CK_SPINLOCK_H */ #endif /* _CK_SPINLOCK_H */

Loading…
Cancel
Save