Re: [RFC v14][PATCH 35/54] Support for share memory address spaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Dave Hansen wrote:
> On Tue, 2009-04-28 at 19:24 -0400, Oren Laadan wrote:
>> +static int checkpoint_task_objs(struct ckpt_ctx *ctx, struct task_struct *t)
>> +{
>> +       struct ckpt_hdr_task_objs *h;
>> +       int mm_objref;
>> +       int ret;
>> +
>> +       mm_objref = checkpoint_mm_obj(ctx, t);
>> +       ckpt_debug("memory: objref %d\n", mm_objref);
>> +       if (mm_objref < 0)
>> +               return mm_objref;
>> +
>> +       h = ckpt_hdr_get_type(ctx, sizeof(*h), CKPT_HDR_TASK_OBJS);
>> +       if (!h)
>> +               return -ENOMEM;
>> +
>> +       h->mm_objref = mm_objref;
>> +
>> +       ret = ckpt_write_obj(ctx, (struct ckpt_hdr *) h);
>> +       ckpt_hdr_put(ctx, h);
>> +       return ret;
>> +}
> 
> I wonder if this gets easier or harder to parse if you do this instead:
> 
> 	ret = ckpt_write_obj(ctx, &h.h);
> 
> It is kinda what we already do for things that use container_of().  
> 

Fine with me.

Oren
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux