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_mutex.c
diff --git
a/tests/benchmark/test_mutex.c
b/tests/benchmark/test_mutex.c
index e06b902c1c54b2e871e2f4fa0ecfb42846e94e8e..55f7c38f21bf66f2d8ad7dbb91cb778256b6ccb4 100644
(file)
--- a/
tests/benchmark/test_mutex.c
+++ b/
tests/benchmark/test_mutex.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"
@@
-85,7
+85,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 */
@@
-93,7
+93,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");
@@
-156,7
+156,7
@@
void *thr_reader(void *data)
pthread_mutex_lock(&lock);
v = test_array.a;
pthread_mutex_lock(&lock);
v = test_array.a;
- assert(v == 8);
+
urcu_posix_
assert(v == 8);
if (caa_unlikely(rduration))
loop_sleep(rduration);
pthread_mutex_unlock(&lock);
if (caa_unlikely(rduration))
loop_sleep(rduration);
pthread_mutex_unlock(&lock);
This page took
0.024464 seconds
and
4
git commands to generate.