Re: [PATCH v2/htab 4/6] [Linux] Optimize PID -> struct lwp_info lookup

Yao Qi
2016-05-24T09:33:39Z

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 (齐尧)