projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 0.11.0
[urcu.git]
/
tests
/
benchmark
/
test_urcu_hash.h
diff --git
a/tests/benchmark/test_urcu_hash.h
b/tests/benchmark/test_urcu_hash.h
index c0727b7ba9898d92d14a51c103a0f95389fa9b55..5e84aefb6743f4004d317d104b7210aa51dc28d4 100644
(file)
--- a/
tests/benchmark/test_urcu_hash.h
+++ b/
tests/benchmark/test_urcu_hash.h
@@
-23,7
+23,6
@@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include "config.h"
#include <stdio.h>
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
#include <stdlib.h>
@@
-37,8
+36,10
@@
#include <signal.h>
#include <urcu/tls-compat.h>
#include <signal.h>
#include <urcu/tls-compat.h>
+#include <compat-rand.h>
#include "cpuset.h"
#include "thread-id.h"
#include "cpuset.h"
#include "thread-id.h"
+#include "../common/debug-yield.h"
#define DEFAULT_HASH_SIZE 32
#define DEFAULT_MIN_ALLOC_SIZE 1
#define DEFAULT_HASH_SIZE 32
#define DEFAULT_MIN_ALLOC_SIZE 1
@@
-248,10
+249,11
@@
uint32_t hash_u32(
/*----------------------------------- handle the last 3 uint32_t's */
switch (length) { /* all the case statements fall through */
/*----------------------------------- handle the last 3 uint32_t's */
switch (length) { /* all the case statements fall through */
- case 3: c += k[2];
- case 2: b += k[1];
+ case 3: c += k[2];
/* fall through */
+ case 2: b += k[1];
/* fall through */
case 1: a += k[0];
final(a, b, c);
case 1: a += k[0];
final(a, b, c);
+ /* fall through */
case 0: /* case 0: nothing left to add */
break;
}
case 0: /* case 0: nothing left to add */
break;
}
@@
-284,10
+286,11
@@
void hashword2(
/*----------------------------------- handle the last 3 uint32_t's */
switch (length) { /* all the case statements fall through */
/*----------------------------------- handle the last 3 uint32_t's */
switch (length) { /* all the case statements fall through */
- case 3: c += k[2];
- case 2: b += k[1];
+ case 3: c += k[2];
/* fall through */
+ case 2: b += k[1];
/* fall through */
case 1: a += k[0];
final(a, b, c);
case 1: a += k[0];
final(a, b, c);
+ /* fall through */
case 0: /* case 0: nothing left to add */
break;
}
case 0: /* case 0: nothing left to add */
break;
}
This page took
0.025906 seconds
and
4
git commands to generate.