[gdbsupport] Add task size parameter in parallel_for_each
authorTom de Vries <tdevries@suse.de>
Fri, 5 Aug 2022 14:12:56 +0000 (16:12 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 5 Aug 2022 14:12:56 +0000 (16:12 +0200)
commitb859a3ef488cd1a3bf072f71002dced36353875b
tree9ec7af8baef949fdc2db0540b3b4b6503f08216f
parent377c3a9c91785d5df5c0d96121160e6210204cc0
[gdbsupport] Add task size parameter in parallel_for_each

Add a task_size parameter to parallel_for_each, defaulting to nullptr, and use
the task size to distribute similarly-sized chunks to the threads.

Tested on x86_64-linux.
gdb/unittests/parallel-for-selftests.c
gdbsupport/parallel-for.h