regressions: Silence some irrelevant compiler warnings.

ck_pring
Samy Al Bahra 14 years ago
parent e1219a4d17
commit c46bc1f1d7

@ -73,6 +73,12 @@ read_thread(void *unused CK_CC_UNUSED)
unsigned int j;
ck_epoch_record_t record;
ck_stack_entry_t *cursor;
/*
* This is redundant post-incremented in order to silence some
* irrelevant GCC warnings. It is volatile in order to prevent
* elimination.
*/
volatile ck_stack_entry_t *n;
ck_epoch_register(&stack_epoch, &record);
@ -98,6 +104,7 @@ read_thread(void *unused CK_CC_UNUSED)
CK_STACK_FOREACH(&stack, cursor) {
n = cursor;
j++;
n++;
}
ck_epoch_end(&record);

@ -65,7 +65,7 @@ CK_STACK_CONTAINER(struct node, stack_entry, stack_container)
static struct affinity a;
static void *
thread(void *unused)
thread(void *unused CK_CC_UNUSED)
{
struct node **entry, *e;
unsigned int i;

@ -139,7 +139,7 @@ stack_pop_mpmc(ck_hp_record_t *record, struct stack *target)
}
static void *
thread(void *unused)
thread(void *unused CK_CC_UNUSED)
{
struct node *entry, *e;
unsigned int i;

@ -49,7 +49,7 @@ static unsigned int barrier;
static struct affinity affinerator;
static void *
consumer(void *unused)
consumer(void *unused CK_CC_UNUSED)
{
struct example copy;
uint32_t version;

@ -40,6 +40,11 @@
#define STEPS 40000
#endif
/*
* Note the redundant post-increment of r. This is to silence
* some irrelevant GCC warnings.
*/
static ck_stack_t stack;
int
@ -85,6 +90,7 @@ main(void)
a += e - s;
}
printf(" spinlock_pop: %16" PRIu64 "\n", a / STEPS / ENTRIES);
r++;
#ifdef CK_F_STACK_PUSH_UPMC
a = 0;
@ -163,6 +169,7 @@ main(void)
a += e - s;
}
printf(" ck_stack_pop_mpmc: %16" PRIu64 "\n", a / STEPS / (sizeof(entry) / sizeof(*entry)));
r++;
#endif
return 0;

Loading…
Cancel
Save