[CRIU] Re: [PATCH cr] [RFC] pstree: simplify access to pid, real_pid, born_sid

Cyrill Gorcunov gorcunov at openvz.org
Fri Jun 1 07:39:14 EDT 2012


On Fri, Jun 01, 2012 at 03:33:56PM +0400, Andrey Vagin wrote:
> 
> New version of pstree_item looks like:
>  struct pstree_item {
>         struct list_head        list;
>         union {
>                struct pid      pid;            /* leader pid */
>                u32 born_sid;
>                struct pid {
>                        u32 real_pid;
>                        u32 pid;
>                } cpt_pid;      /* leader pid */
>                struct {
>                        union {
>                                u32 born_sid;
>                                u32 real_pid;
>                        };
>                        u32 pid;
>                };
>         };
>         struct pstree_item      *parent;
> 
> In this case we can use pi->pid instead of pi->pid.pid and so on...

Looks reasonable to me, thanks.

	Cyrill


More information about the CRIU mailing list