projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests/regression/rcutorture: Add wait state
[urcu.git]
/
tests
/
benchmark
/
test_perthreadlock.c
diff --git
a/tests/benchmark/test_perthreadlock.c
b/tests/benchmark/test_perthreadlock.c
index 7a0b79a81874c3ce6f9ad2aca8bd0f6eef2c61b3..47a512cba06b12d8672247710db5feabdd2e3c45 100644
(file)
--- a/
tests/benchmark/test_perthreadlock.c
+++ b/
tests/benchmark/test_perthreadlock.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) {
errno = ret;
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
errno = ret;
@@
-184,7
+184,7
@@
void *thr_reader(void *data)
urcu_mutex_lock(&per_thread_lock[tidx].lock);
v = test_array.a;
urcu_mutex_lock(&per_thread_lock[tidx].lock);
v = test_array.a;
- assert(v == 8);
+
urcu_posix_
assert(v == 8);
if (caa_unlikely(rduration))
loop_sleep(rduration);
urcu_mutex_unlock(&per_thread_lock[tidx].lock);
if (caa_unlikely(rduration))
loop_sleep(rduration);
urcu_mutex_unlock(&per_thread_lock[tidx].lock);
This page took
0.023601 seconds
and
4
git commands to generate.