- urcu_worker_init(&workqueue, &worker, URCU_WORKER_STEAL);
- //urcu_worker_init(&workqueue, &worker, 0);
+ urcu_worker_init(&workqueue, &worker);
printf(" [-a cpu#] [-a cpu#]... (affinity)\n");
printf(" [-w] Wait for worker to empty stack\n");
printf(" [-m len] (Max queue length. 0 means infinite.))\n");
printf(" [-a cpu#] [-a cpu#]... (affinity)\n");
printf(" [-w] Wait for worker to empty stack\n");
printf(" [-m len] (Max queue length. 0 means infinite.))\n");
unsigned long long tot_enqueues = 0, tot_dequeues = 0;
unsigned long long end_dequeues = 0;
int i, a, retval = 0;
unsigned long long tot_enqueues = 0, tot_dequeues = 0;
unsigned long long end_dequeues = 0;
int i, a, retval = 0;
tid_worker = calloc(nr_workers, sizeof(*tid_worker));
count_dispatcher = calloc(nr_dispatchers, sizeof(*count_dispatcher));
count_worker = calloc(nr_workers, sizeof(*count_worker));
tid_worker = calloc(nr_workers, sizeof(*tid_worker));
count_dispatcher = calloc(nr_dispatchers, sizeof(*count_dispatcher));
count_worker = calloc(nr_workers, sizeof(*count_worker));
- urcu_workqueue_init(&workqueue, max_queue_len);
+ if (test_steal)
+ worker_flags |= URCU_WORKER_STEAL;
+ urcu_workqueue_init(&workqueue, max_queue_len, worker_flags);
printf("SUMMARY %-25s testdur %4lu nr_dispatchers %3u dispatch_delay_loops %6lu "
"work_loops %lu nr_workers %3u "
printf("SUMMARY %-25s testdur %4lu nr_dispatchers %3u dispatch_delay_loops %6lu "
"work_loops %lu nr_workers %3u "
argv[0], duration, nr_dispatchers, dispatch_delay_loops, work_loops,
argv[0], duration, nr_dispatchers, dispatch_delay_loops, work_loops,
- nr_workers, tot_enqueues, tot_dequeues, max_queue_len);
+ nr_workers, tot_enqueues, tot_dequeues, max_queue_len,
+ test_steal ? "enabled" : "disabled");