X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=tests%2Fbenchmark%2Ftest_urcu_lfq.c;h=77ccb85b0e777714b624547b0d7a0986c1188fc7;hb=61c3fb603104bda9e67c0690c1964e61a770d045;hp=26247b50022f8e3ecaf27acdc5f6d12fcfece758;hpb=83e334d03eaba62df373cf44298616458900078a;p=urcu.git diff --git a/tests/benchmark/test_urcu_lfq.c b/tests/benchmark/test_urcu_lfq.c index 26247b5..77ccb85 100644 --- a/tests/benchmark/test_urcu_lfq.c +++ b/tests/benchmark/test_urcu_lfq.c @@ -36,7 +36,6 @@ #include #include -#include "cpuset.h" #include "thread-id.h" /* hardcoded number of CPUs */ @@ -102,11 +101,7 @@ static void set_affinity(void) CPU_ZERO(&mask); CPU_SET(cpu, &mask); -#if SCHED_SETAFFINITY_ARGS == 2 - sched_setaffinity(0, &mask); -#else sched_setaffinity(0, sizeof(mask), &mask); -#endif #endif /* HAVE_SCHED_SETAFFINITY */ } @@ -139,6 +134,7 @@ struct test { static struct cds_lfq_queue_rcu q; +static void *thr_enqueuer(void *_count) { unsigned long long *count = _count; @@ -194,6 +190,7 @@ void free_node_cb(struct rcu_head *head) free(node); } +static void *thr_dequeuer(void *_count) { unsigned long long *count = _count; @@ -243,6 +240,7 @@ void *thr_dequeuer(void *_count) return ((void*)2); } +static void test_end(struct cds_lfq_queue_rcu *q, unsigned long long *nr_dequeues) { struct cds_lfq_node_rcu *snode; @@ -259,6 +257,7 @@ void test_end(struct cds_lfq_queue_rcu *q, unsigned long long *nr_dequeues) } while (snode); } +static void show_usage(int argc, char **argv) { printf("Usage : %s nr_dequeuers nr_enqueuers duration (s) \n",