projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: CDS_WFCQ_WOULDBLOCK typing for c++
[urcu.git]
/
tests
/
benchmark
/
test_urcu_lfs.c
diff --git
a/tests/benchmark/test_urcu_lfs.c
b/tests/benchmark/test_urcu_lfs.c
index 33ba06981af263a7a90bc0ae7d3f6aca9c85ecb8..1d2dc84b50dadce681d3e4da585889e4c06f5a44 100644
(file)
--- a/
tests/benchmark/test_urcu_lfs.c
+++ b/
tests/benchmark/test_urcu_lfs.c
@@
-50,6
+50,8
@@
#include <urcu.h>
#include <urcu/cds.h>
#include <urcu.h>
#include <urcu/cds.h>
+#define POISON_PTR ((void *) 0x42UL)
+
/*
* External synchronization used.
*/
/*
* External synchronization used.
*/
@@
-219,6
+221,7
@@
void do_test_pop(enum test_sync sync)
if (snode) {
struct test *node;
if (snode) {
struct test *node;
+ snode->next = POISON_PTR;
node = caa_container_of(snode,
struct test, list);
if (sync == TEST_SYNC_RCU)
node = caa_container_of(snode,
struct test, list);
if (sync == TEST_SYNC_RCU)
@@
-241,6
+244,7
@@
void do_test_pop_all(enum test_sync sync)
cds_lfs_for_each_safe(head, snode, n) {
struct test *node;
cds_lfs_for_each_safe(head, snode, n) {
struct test *node;
+ snode->next = POISON_PTR;
node = caa_container_of(snode, struct test, list);
if (sync == TEST_SYNC_RCU)
call_rcu(&node->rcu, free_node_cb);
node = caa_container_of(snode, struct test, list);
if (sync == TEST_SYNC_RCU)
call_rcu(&node->rcu, free_node_cb);
@@
-465,8
+469,10
@@
int main(int argc, char **argv)
for (i = 0; i < duration; i++) {
sleep(1);
for (i = 0; i < duration; i++) {
sleep(1);
- if (verbose_mode)
- write (1, ".", 1);
+ if (verbose_mode) {
+ fwrite(".", sizeof(char), 1, stdout);
+ fflush(stdout);
+ }
}
test_stop = 1;
}
test_stop = 1;
This page took
0.025083 seconds
and
4
git commands to generate.