#include <sys/wait.h>
#include <unistd.h>
#include <stdio.h>
-#include <assert.h>
#include <errno.h>
#include <urcu/arch.h>
+#include <urcu/assert.h>
#include <urcu/tls-compat.h>
#include <urcu/uatomic.h>
#include "thread-id.h"
static void set_affinity(void)
{
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
int cpu, ret;
#endif /* HAVE_SCHED_SETAFFINITY */
if (!use_affinity)
return;
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
ret = pthread_mutex_lock(&affinity_mutex);
if (ret) {
perror("Error in pthread mutex lock");
switch (ret) {
case CDS_WFCQ_RET_WOULDBLOCK:
- assert(0); /* blocking call */
+ urcu_posix_assert(0); /* blocking call */
break;
case CDS_WFCQ_RET_DEST_EMPTY:
URCU_TLS(nr_splice)++;
/* ok */
break;
case CDS_WFCQ_RET_DEST_NON_EMPTY:
- assert(0); /* entirely unexpected */
+ urcu_posix_assert(0); /* entirely unexpected */
break;
case CDS_WFCQ_RET_SRC_EMPTY:
/* ok, we could even skip iteration on dest if we wanted */