[Devel] Re: [PATCH 1/1] c/r: define s390-specific checkpoint-restart code (v3)

Dan Smith danms at us.ibm.com
Tue Feb 3 11:35:52 PST 2009


SH> +static void cr_save_cpu_regs(struct cr_hdr_cpu *hh, struct task_struct *t)
SH> +{

<snip>

SH> +	/* per_info */
SH> +	memcpy(&hh->per_control_regs, &thread->per_info.control_regs.words,
SH> +		3 * sizeof(unsigned long));
SH> +	hh->em_instr = 0;
SH> +	if (thread->per_info.single_step)
SH> +		hh->em_instr |= 1;
SH> +	if (thread->per_info.instruction_fetch)
SH> +		hh->em_instr |= 2;

I think that defining these constants (3, 1, and 2) would help me
understand what's being done here.  You use them again in
cr_read_cpu(), which also makes it worthwhile I think.

-- 
Dan Smith
IBM Linux Technology Center
email: danms at us.ibm.com

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




More information about the Devel mailing list