This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2/htab 4/6] [Linux] Optimize PID -> struct lwp_info lookup
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Tue, 24 May 2016 10:33:17 +0100
- Subject: Re: [PATCH v2/htab 4/6] [Linux] Optimize PID -> struct lwp_info lookup
- Authentication-results: sourceware.org; auth=none
- References: <1463669290-30415-1-git-send-email-palves at redhat dot com> <1463669290-30415-5-git-send-email-palves at redhat dot com> <86d1oc7wb4 dot fsf at gmail dot com> <c331c6b6-f38e-ba10-1789-630732e14490 at redhat dot com>
Pedro Alves <palves@redhat.com> writes:
Hi Pedro,
Patch is good to me, a nit on comments,
> +/* Head of double-linked list of known LWPs. Sorted by reverse
> + creation order. This order is assumed in some cases. E.g.,
> + reaping status after killing alls lwps of a process: the leader LWP
> + must be reaped last. */
> struct lwp_info *lwp_list;
> +
> +/* Add LP to sorted-by-creation-order double-linked list. */
> +
To reflect the code,
s/sorted-by-creation-order/sorted-by-reverse-creation-order/
> +
> +/* Remove LP from sorted-by-creation-order double-linked list. */
> +
Likewise.
>
> - /* Next LWP in list. */
> + /* Previous and next pointers in double-linked list of known LWPs,
> + sorted by reverse creation order. */
> + struct lwp_info *prev;
--
Yao (éå)