unsigned long start, unsigned long len);
};
+enum nr_cpus_mask_state {
+ NR_CPUS_MASK_INIT_FAILED = -2,
+ NR_CPUS_MASK_UNINITIALIZED = -1,
+};
+
static struct urcu_workqueue *cds_lfht_workqueue;
/*
urcu_die(ret);
}
-static long nr_cpus_mask = -1;
+static long nr_cpus_mask = NR_CPUS_MASK_UNINITIALIZED;
static long split_count_mask = -1;
static int split_count_order = -1;
maxcpus = get_possible_cpus_array_len();
if (maxcpus <= 0) {
- nr_cpus_mask = -2;
+ nr_cpus_mask = NR_CPUS_MASK_INIT_FAILED;
return;
}
/*
static
void alloc_split_items_count(struct cds_lfht *ht)
{
- if (nr_cpus_mask == -1) {
+ if (nr_cpus_mask == NR_CPUS_MASK_UNINITIALIZED) {
ht_init_nr_cpus_mask();
if (nr_cpus_mask < 0)
split_count_mask = DEFAULT_SPLIT_COUNT_MASK;
unsigned long thread, nr_threads;
sigset_t newmask, oldmask;
- urcu_posix_assert(nr_cpus_mask != -1);
+ urcu_posix_assert(nr_cpus_mask != NR_CPUS_MASK_UNINITIALIZED);
if (nr_cpus_mask < 0 || len < 2 * MIN_PARTITION_PER_THREAD)
goto fallback;