This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] GDB checkpoint can't/shouldn't be possible with multiple threads on Linux
Small nit I should have caught before:
On Tuesday 12 April 2011 14:27:49, Kevin Pouget wrote:
> +static int
> +inf_has_multiple_thread_cb (struct thread_info *tp, void *data)
> +{
> + int *has_multiple_threads = (int *) data;
can you rename this local as well, in line with the other
local in the other function? To "count", or "count_p", or something
like that. Thanks. (pre-approved)
> + if (current_inferior ()->pid == ptid_get_pid (tp->ptid))
> + (*has_multiple_threads)++;
> +
> + /* Stop the iteration if multiple threads have been detected. */
> + return *has_multiple_threads > 1;
> +}
> +
> +/* Return true if the current inferior is multi-threaded. */
> +
> +static int
> +inf_has_multiple_threads (void)
> +{
> + int count = 0;
> +
> + iterate_over_threads (inf_has_multiple_thread_cb, &count);
--
Pedro Alves