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_rwlock.c
diff --git
a/tests/benchmark/test_rwlock.c
b/tests/benchmark/test_rwlock.c
index 7ba72e06d40f29e036490772d7aebbc40695d139..6908ea4ca5b4a7f315d76a5212640adface5073a 100644
(file)
--- a/
tests/benchmark/test_rwlock.c
+++ b/
tests/benchmark/test_rwlock.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 <urcu/tls-compat.h>
#include "thread-id.h"
@@
-89,7
+89,7
@@
pthread_mutex_t affinity_mutex = PTHREAD_MUTEX_INITIALIZER;
static void set_affinity(void)
{
static void set_affinity(void)
{
-#if HAVE_SCHED_SETAFFINITY
+#if
def
HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
int cpu, ret;
#endif /* HAVE_SCHED_SETAFFINITY */
cpu_set_t mask;
int cpu, ret;
#endif /* HAVE_SCHED_SETAFFINITY */
@@
-97,7
+97,7
@@
static void set_affinity(void)
if (!use_affinity)
return;
if (!use_affinity)
return;
-#if HAVE_SCHED_SETAFFINITY
+#if
def
HAVE_SCHED_SETAFFINITY
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
perror("Error in pthread mutex lock");
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
perror("Error in pthread mutex lock");
@@
-161,7
+161,7
@@
void *thr_reader(void *_count)
}
a = test_array.a;
}
a = test_array.a;
- assert(a == 8);
+
urcu_posix_
assert(a == 8);
if (caa_unlikely(rduration))
loop_sleep(rduration);
if (caa_unlikely(rduration))
loop_sleep(rduration);
This page took
0.023559 seconds
and
4
git commands to generate.