projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wfstack: return whether pop is popping the last element
[urcu.git]
/
tests
/
test_urcu_wfs.c
diff --git
a/tests/test_urcu_wfs.c
b/tests/test_urcu_wfs.c
index 1c852b9dd0abce809d5e7b679300673c88bbe469..90b2c3892558c6db3a9e0550f9957fe4d6496569 100644
(file)
--- a/
tests/test_urcu_wfs.c
+++ b/
tests/test_urcu_wfs.c
@@
-34,11
+34,12
@@
#include <unistd.h>
#include <stdio.h>
#include <assert.h>
#include <unistd.h>
#include <stdio.h>
#include <assert.h>
-#include <sched.h>
#include <errno.h>
#include <urcu/arch.h>
#include <urcu/tls-compat.h>
#include <errno.h>
#include <urcu/arch.h>
#include <urcu/tls-compat.h>
+#include <urcu/uatomic.h>
+#include "cpuset.h"
#ifdef __linux__
#include <syscall.h>
#ifdef __linux__
#include <syscall.h>
@@
-65,7
+66,6
@@
static inline pid_t gettid(void)
#ifndef DYNAMIC_LINK_TEST
#define _LGPL_SOURCE
#endif
#ifndef DYNAMIC_LINK_TEST
#define _LGPL_SOURCE
#endif
-#include <urcu.h>
#include <urcu/wfstack.h>
/*
#include <urcu/wfstack.h>
/*
@@
-112,12
+112,6
@@
static int use_affinity = 0;
pthread_mutex_t affinity_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t affinity_mutex = PTHREAD_MUTEX_INITIALIZER;
-#ifndef HAVE_CPU_SET_T
-typedef unsigned long cpu_set_t;
-# define CPU_ZERO(cpuset) do { *(cpuset) = 0; } while(0)
-# define CPU_SET(cpu, cpuset) do { *(cpuset) |= (1UL << (cpu)); } while(0)
-#endif
-
static void set_affinity(void)
{
#if HAVE_SCHED_SETAFFINITY
static void set_affinity(void)
{
#if HAVE_SCHED_SETAFFINITY
@@
-256,7
+250,7
@@
static void do_test_pop_all(enum test_sync sync)
cds_wfs_pop_unlock(&s);
/* Check if empty */
cds_wfs_pop_unlock(&s);
/* Check if empty */
- if (cds_wfs_first
_blocking
(head) == NULL)
+ if (cds_wfs_first(head) == NULL)
return;
URCU_TLS(nr_pop_all)++;
return;
URCU_TLS(nr_pop_all)++;
This page took
0.022943 seconds
and
4
git commands to generate.