#include <sys/wait.h>
#include <unistd.h>
#include <stdio.h>
-#include <assert.h>
#include <pthread.h>
#include <errno.h>
#include <urcu/arch.h>
+#include <urcu/assert.h>
#include "thread-id.h"
static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *reader_time;
static caa_cycles_t __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *writer_time;
+static
void *thr_reader(void *arg)
{
caa_cycles_t time1, time2;
perror("Error in pthread mutex lock");
exit(-1);
}
- assert(test_array.a == 8);
+ urcu_posix_assert(test_array.a == 8);
ret = pthread_mutex_unlock(&per_thread_lock[tidx].lock);
if (ret) {
perror("Error in pthread mutex unlock");
}
+static
void *thr_writer(void *arg)
{
caa_cycles_t time1, time2;