Silence compiler warnings for ck_hp.

GCC suggests parenthesis in ck_hp_member_scan. Silence
the associated warnings.
ck_pring
Samy Al Bahra 14 years ago
parent b0bf7661d1
commit a181955305

@ -34,17 +34,6 @@
#include <unistd.h>
#include <sys/time.h>
#ifdef __linux__
#include <sched.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/syscall.h>
#endif
#ifndef CORES
#define CORES 8
#endif
#include <ck_backoff.h>
#include <ck_cc.h>
#include <ck_pr.h>
@ -54,6 +43,8 @@
#include <ck_stack.h>
#include <ck_hp_stack.h>
#include "../../common.h"
static unsigned int threshold;
static unsigned int n_threads;
static unsigned int barrier;
@ -70,46 +61,9 @@ struct node {
};
static ck_stack_t stack = {NULL, NULL};
static ck_hp_t stack_hp;
CK_STACK_CONTAINER(struct node, stack_entry, stack_container)
struct affinity {
uint32_t delta;
uint32_t request;
};
static struct affinity a;
#ifdef __linux__
#ifndef gettid
static pid_t
gettid(void)
{
return syscall(__NR_gettid);
}
#endif
static int
aff_iterate(struct affinity *acb)
{
cpu_set_t s;
int c;
c = ck_pr_faa_uint(&acb->request, acb->delta);
CPU_ZERO(&s);
CPU_SET(c % CORES, &s);
return sched_setaffinity(gettid(), sizeof(s), &s);
}
#else
static int
aff_iterate(struct affinity *acb)
{
acb = NULL;
return (0);
}
#endif
static void *
thread(void *unused)
{

@ -173,7 +173,7 @@ ck_hp_member_scan(ck_stack_entry_t *entry, unsigned int degree, void *pointer)
if (hazard == pointer)
return (true);
}
} while (entry = CK_STACK_NEXT(entry));
} while ((entry = CK_STACK_NEXT(entry)) != NULL);
return (false);
}

Loading…
Cancel
Save