projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: add missing run.sh to benchmark makefile
[userspace-rcu.git]
/
rculfhash.c
diff --git
a/rculfhash.c
b/rculfhash.c
index 19767096d20b0f3e840059596a7ea0ec4673c30f..6a41b92fa5fb11e3630e56f47ef161c0e4e6ca0f 100644
(file)
--- a/
rculfhash.c
+++ b/
rculfhash.c
@@
-266,6
+266,7
@@
#include <sched.h>
#include "config.h"
#include <sched.h>
#include "config.h"
+#include "compat-getcpu.h"
#include <urcu.h>
#include <urcu-call-rcu.h>
#include <urcu-flavor.h>
#include <urcu.h>
#include <urcu-call-rcu.h>
#include <urcu-flavor.h>
@@
-619,26
+620,18
@@
void free_split_items_count(struct cds_lfht *ht)
poison_free(ht->split_count);
}
poison_free(ht->split_count);
}
-#if defined(HAVE_SCHED_GETCPU)
static
int ht_get_split_count_index(unsigned long hash)
{
int cpu;
assert(split_count_mask >= 0);
static
int ht_get_split_count_index(unsigned long hash)
{
int cpu;
assert(split_count_mask >= 0);
- cpu = sched_getcpu();
+ cpu =
urcu_
sched_getcpu();
if (caa_unlikely(cpu < 0))
return hash & split_count_mask;
else
return cpu & split_count_mask;
}
if (caa_unlikely(cpu < 0))
return hash & split_count_mask;
else
return cpu & split_count_mask;
}
-#else /* #if defined(HAVE_SCHED_GETCPU) */
-static
-int ht_get_split_count_index(unsigned long hash)
-{
- return hash & split_count_mask;
-}
-#endif /* #else #if defined(HAVE_SCHED_GETCPU) */
static
void ht_count_add(struct cds_lfht *ht, unsigned long size, unsigned long hash)
static
void ht_count_add(struct cds_lfht *ht, unsigned long size, unsigned long hash)
This page took
0.026672 seconds
and
4
git commands to generate.