X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=tests%2Fbenchmark%2Ftest_urcu_lfs_rcu.c;h=a26460a420721f55265bd969b8efbe11da0043cc;hb=61c3fb603104bda9e67c0690c1964e61a770d045;hp=d0e80db51b451de612ab3c247bb029011a8a637b;hpb=83e334d03eaba62df373cf44298616458900078a;p=urcu.git diff --git a/tests/benchmark/test_urcu_lfs_rcu.c b/tests/benchmark/test_urcu_lfs_rcu.c index d0e80db..a26460a 100644 --- a/tests/benchmark/test_urcu_lfs_rcu.c +++ b/tests/benchmark/test_urcu_lfs_rcu.c @@ -36,7 +36,6 @@ #include #include -#include "cpuset.h" #include "thread-id.h" /* hardcoded number of CPUs */ @@ -106,11 +105,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 */ } @@ -143,6 +138,7 @@ struct test { static struct cds_lfs_stack_rcu s; +static void *thr_enqueuer(void *_count) { unsigned long long *count = _count; @@ -197,6 +193,7 @@ void free_node_cb(struct rcu_head *head) free(node); } +static void *thr_dequeuer(void *_count) { unsigned long long *count = _count; @@ -245,6 +242,7 @@ void *thr_dequeuer(void *_count) return ((void*)2); } +static void test_end(struct cds_lfs_stack_rcu *s, unsigned long long *nr_dequeues) { struct cds_lfs_node_rcu *snode; @@ -261,6 +259,7 @@ void test_end(struct cds_lfs_stack_rcu *s, 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",