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");
{
if (caa_unlikely(key1_len != key2_len))
return -1;
- assert(key1_len == sizeof(unsigned long));
+ urcu_posix_assert(key1_len == sizeof(unsigned long));
if (key1 == key2)
return 0;
else
int ret;
ret = cds_lfht_del(test_ht, cds_lfht_iter_get_node(&iter));
- assert(!ret);
+ urcu_posix_assert(!ret);
call_rcu(&node->head, free_node_cb);
count++;
}
*/
rcu_register_thread();
ret = (get_populate_hash_cb())();
- assert(!ret);
+ urcu_posix_assert(!ret);
rcu_thread_offline();