projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rculfhash: constify all key arguments passed to API
[userspace-rcu.git]
/
tests
/
test_urcu_hash.c
diff --git
a/tests/test_urcu_hash.c
b/tests/test_urcu_hash.c
index 509767c02e795411ff94cbc5582f589e2d792e31..fe650f36a083a81d08991bf1a6b18c85baccd098 100644
(file)
--- a/
tests/test_urcu_hash.c
+++ b/
tests/test_urcu_hash.c
@@
-384,7
+384,7
@@
void hashword2(
#if (CAA_BITS_PER_LONG == 32)
static
#if (CAA_BITS_PER_LONG == 32)
static
-unsigned long test_hash(void *_key, size_t length, unsigned long seed)
+unsigned long test_hash(
const
void *_key, size_t length, unsigned long seed)
{
unsigned int key = (unsigned int) _key;
{
unsigned int key = (unsigned int) _key;
@@
-393,7
+393,7
@@
unsigned long test_hash(void *_key, size_t length, unsigned long seed)
}
#else
static
}
#else
static
-unsigned long test_hash(void *_key, size_t length, unsigned long seed)
+unsigned long test_hash(
const
void *_key, size_t length, unsigned long seed)
{
union {
uint64_t v64;
{
union {
uint64_t v64;
@@
-413,8
+413,8
@@
unsigned long test_hash(void *_key, size_t length, unsigned long seed)
#endif
static
#endif
static
-unsigned long test_compare(void *key1, size_t key1_len,
- void *key2, size_t key2_len)
+unsigned long test_compare(
const
void *key1, size_t key1_len,
+
const
void *key2, size_t key2_len)
{
if (caa_unlikely(key1_len != key2_len))
return -1;
{
if (caa_unlikely(key1_len != key2_len))
return -1;
@@
-426,7
+426,7
@@
unsigned long test_compare(void *key1, size_t key1_len,
}
static
}
static
-int test_match(struct cds_lfht_node *node, void *key)
+int test_match(struct cds_lfht_node *node,
const
void *key)
{
struct lfht_test_node *test_node = to_test_node(node);
{
struct lfht_test_node *test_node = to_test_node(node);
This page took
0.022929 seconds
and
4
git commands to generate.