[CRIU] [PATCH 3/7] parasite: Add init_thread() helper
Pavel Emelyanov
xemul at parallels.com
Tue Nov 6 04:35:32 EST 2012
On 11/06/2012 01:10 PM, Cyrill Gorcunov wrote:
> On Tue, Nov 06, 2012 at 01:07:28PM +0400, Pavel Emelyanov wrote:
>>> @@ -27,10 +27,13 @@ static struct tid_state_s {
>>> } *tid_state;
>>>
>>> static unsigned int nr_tid_state;
>>> +static unsigned int next_tid_state;
>>> +
>>> #define TID_STATE_SIZE(n) \
>>> (ALIGN(sizeof(struct tid_state_s) * n, PAGE_SIZE))
>>>
>>> #define thread_leader (&tid_state[0])
>>> +#define thread_next (&tid_state[next_tid_state])
>>
>> These are obfuscating names. Don't do that.
>
> Well, I tend to agree that thread_next might be a bit unclear but
> as to thread_leader -- no, it's not obfuscating, it represents
I'm not talking about it. Only next_... are bad.
> exactly what we have, tid_state[0] is _always_ a thread leader
> and instead of keeping that implied better to explress with
> representative name.
>
More information about the CRIU
mailing list