[CRIU] [PATCH] pstree: rename lookup_create_{item <=> pid}

Pavel Emelyanov xemul at virtuozzo.com
Thu Nov 17 02:42:39 PST 2016


On 11/17/2016 12:35 PM, Dmitry Safonov wrote:
> On 11/17/2016 11:27 AM, Pavel Emelyanov wrote:
>> On 11/14/2016 09:36 PM, Dmitry Safonov wrote:
>>> I suggest to rename lookup_create_pid into lookup_create_item and
>>> backwards. I think, the naming is misleading, now *_pid() looks for/creates
>>> pstree item, which can be thread, undef task or anything else,
>>
>> But at the same time lookup_create_pid returns struct pid *, lookup_create_item
>> returns struct pstree_item and you suggest to mess it up :)
> 
> Oh, yes - didn't catch that.
> Maybe something like lookup_create_process()?
> Or maybe leave as is - I just find it a little confusing that sounding
> "more generic" _create_item() doesn't create threads %)
> ...while _create_pid() does.

Yup, some better names are welcome.
Maybe lookup_create_pstree_item?
This is exactly what it, you know, looks up and, well, creates.

-- Pavel




More information about the CRIU mailing list