projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add unit tests for possible_cpus_array_len
[urcu.git]
/
tests
/
benchmark
/
test_urcu_assign.c
diff --git
a/tests/benchmark/test_urcu_assign.c
b/tests/benchmark/test_urcu_assign.c
index dcb5d1e74fa7904a0bcafd06de05e1df48354a5b..88889a89d0421097b90177f1853f7ac3fa5cb0db 100644
(file)
--- a/
tests/benchmark/test_urcu_assign.c
+++ b/
tests/benchmark/test_urcu_assign.c
@@
-28,10
+28,10
@@
#include <sys/wait.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/wait.h>
#include <unistd.h>
#include <stdio.h>
-#include <assert.h>
#include <errno.h>
#include <urcu/arch.h>
#include <errno.h>
#include <urcu/arch.h>
+#include <urcu/assert.h>
#include <urcu/tls-compat.h>
#include "thread-id.h"
#include "../common/debug-yield.h"
#include <urcu/tls-compat.h>
#include "thread-id.h"
#include "../common/debug-yield.h"
@@
-172,7
+172,7
@@
static struct test_array *test_array_alloc(void)
int index;
index = array_index % ARRAY_SIZE;
int index;
index = array_index % ARRAY_SIZE;
- assert(test_array[index].a == ARRAY_POISON ||
+
urcu_posix_
assert(test_array[index].a == ARRAY_POISON ||
test_array[index].a == 0);
ret = &test_array[index];
array_index++;
test_array[index].a == 0);
ret = &test_array[index];
array_index++;
@@
-211,7
+211,7
@@
void *thr_reader(void *_count)
local_ptr = rcu_dereference(test_rcu_pointer);
rcu_debug_yield_read();
if (local_ptr)
local_ptr = rcu_dereference(test_rcu_pointer);
rcu_debug_yield_read();
if (local_ptr)
- assert(local_ptr->a == 8);
+
urcu_posix_
assert(local_ptr->a == 8);
if (caa_unlikely(rduration))
loop_sleep(rduration);
rcu_read_unlock();
if (caa_unlikely(rduration))
loop_sleep(rduration);
rcu_read_unlock();
This page took
0.024201 seconds
and
4
git commands to generate.