[Devel] Re: [RFC v14][PATCH 35/54] Support for share memory address spaces
Dave Hansen
dave at linux.vnet.ibm.com
Wed May 20 10:55:56 PDT 2009
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().
-- Dave
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list