projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: compat_futex should work-around futex signal-restart kernel bug
[userspace-rcu.git]
/
rculfhash.c
diff --git
a/rculfhash.c
b/rculfhash.c
index 8a8ede7a6cadd1027a2c55c450ac3016f696fa6c..2e90d4dfee36106723708a6c0def5c4d5567f998 100644
(file)
--- a/
rculfhash.c
+++ b/
rculfhash.c
@@
-264,9
+264,10
@@
#include <stdint.h>
#include <string.h>
#include <sched.h>
#include <stdint.h>
#include <string.h>
#include <sched.h>
+#include <unistd.h>
#include "config.h"
#include "config.h"
-#include <urcu.h>
+#include <urcu
-pointer
.h>
#include <urcu-call-rcu.h>
#include <urcu-flavor.h>
#include <urcu/arch.h>
#include <urcu-call-rcu.h>
#include <urcu-flavor.h>
#include <urcu/arch.h>
@@
-1176,6
+1177,10
@@
void partition_resize_helper(struct cds_lfht *ht, unsigned long i,
int thread, ret;
unsigned long nr_threads;
int thread, ret;
unsigned long nr_threads;
+ assert(nr_cpus_mask != -1);
+ if (nr_cpus_mask < 0 || len < 2 * MIN_PARTITION_PER_THREAD)
+ goto fallback;
+
/*
* Note: nr_cpus_mask + 1 is always power of 2.
* We spawn just the number of threads we need to satisfy the minimum
/*
* Note: nr_cpus_mask + 1 is always power of 2.
* We spawn just the number of threads we need to satisfy the minimum
@@
-1268,13
+1273,6
@@
static
void init_table_populate(struct cds_lfht *ht, unsigned long i,
unsigned long len)
{
void init_table_populate(struct cds_lfht *ht, unsigned long i,
unsigned long len)
{
- assert(nr_cpus_mask != -1);
- if (nr_cpus_mask < 0 || len < 2 * MIN_PARTITION_PER_THREAD) {
- ht->flavor->thread_online();
- init_table_populate_partition(ht, i, 0, len);
- ht->flavor->thread_offline();
- return;
- }
partition_resize_helper(ht, i, len, init_table_populate_partition);
}
partition_resize_helper(ht, i, len, init_table_populate_partition);
}
@@
-1367,14
+1365,6
@@
void remove_table_partition(struct cds_lfht *ht, unsigned long i,
static
void remove_table(struct cds_lfht *ht, unsigned long i, unsigned long len)
{
static
void remove_table(struct cds_lfht *ht, unsigned long i, unsigned long len)
{
-
- assert(nr_cpus_mask != -1);
- if (nr_cpus_mask < 0 || len < 2 * MIN_PARTITION_PER_THREAD) {
- ht->flavor->thread_online();
- remove_table_partition(ht, i, 0, len);
- ht->flavor->thread_offline();
- return;
- }
partition_resize_helper(ht, i, len, remove_table_partition);
}
partition_resize_helper(ht, i, len, remove_table_partition);
}
@@
-1397,7
+1387,7
@@
void fini_table(struct cds_lfht *ht,
unsigned long len;
len = 1UL << (i - 1);
unsigned long len;
len = 1UL << (i - 1);
- dbg_printf("fini order %l
u
len: %lu\n", i, len);
+ dbg_printf("fini order %l
d
len: %lu\n", i, len);
/* Stop shrink if the resize target changes under us */
if (CMM_LOAD_SHARED(ht->resize_target) > (1UL << (i - 1)))
/* Stop shrink if the resize target changes under us */
if (CMM_LOAD_SHARED(ht->resize_target) > (1UL << (i - 1)))
This page took
0.024201 seconds
and
4
git commands to generate.