projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add `urcu_posix_assert()` as `assert()` replacement
[userspace-rcu.git]
/
tests
/
benchmark
/
test_urcu_qsbr.c
diff --git
a/tests/benchmark/test_urcu_qsbr.c
b/tests/benchmark/test_urcu_qsbr.c
index 6a5174472b2c86b934edf812cd7a62a963b52fae..1ea369cbea9203fa690bee1d80c96f63fff488a4 100644
(file)
--- a/
tests/benchmark/test_urcu_qsbr.c
+++ b/
tests/benchmark/test_urcu_qsbr.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"
@@
-140,9
+140,9
@@
void *thr_reader(void *_count)
rcu_register_thread();
rcu_register_thread();
- assert(rcu_read_ongoing());
+
urcu_posix_
assert(rcu_read_ongoing());
rcu_thread_offline();
rcu_thread_offline();
- assert(!rcu_read_ongoing());
+
urcu_posix_
assert(!rcu_read_ongoing());
rcu_thread_online();
while (!test_go)
rcu_thread_online();
while (!test_go)
@@
-152,11
+152,11
@@
void *thr_reader(void *_count)
for (;;) {
rcu_read_lock();
for (;;) {
rcu_read_lock();
- assert(rcu_read_ongoing());
+
urcu_posix_
assert(rcu_read_ongoing());
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 == 8);
+
urcu_posix_
assert(*local_ptr == 8);
if (caa_unlikely(rduration))
loop_sleep(rduration);
rcu_read_unlock();
if (caa_unlikely(rduration))
loop_sleep(rduration);
rcu_read_unlock();
@@
-199,7
+199,7
@@
void *thr_writer(void *_count)
for (;;) {
new = malloc(sizeof(int));
for (;;) {
new = malloc(sizeof(int));
- assert(new);
+
urcu_posix_
assert(new);
*new = 8;
old = rcu_xchg_pointer(&test_rcu_pointer, new);
if (caa_unlikely(wduration))
*new = 8;
old = rcu_xchg_pointer(&test_rcu_pointer, new);
if (caa_unlikely(wduration))
This page took
0.023903 seconds
and
4
git commands to generate.