kernels/linux-2.4.0/arch/ppc/kernel/ptrace.c
/*
 * Write contents of register REGNO in task TASK.
 */
Write contents of register REGNO in task TASK.
Write contents of register REGNO in task TASK .
static inline int put_reg(struct task_struct *task, int regno,
			  unsigned long data)
{
	if (regno <= PT_MQ) {
		if (regno == PT_MSR)
			data = (data & MSR_DEBUGCHANGE)
				| (task->thread.regs->msr & ~MSR_DEBUGCHANGE);
		((unsigned long *)task->thread.regs)[regno] = data;
		return 0;
	}
	return -EIO;
}
static inline int put_reg ( struct task_struct * task , int regno , unsigned long data ) { if ( regno <= PT_MQ ) { if ( regno == PT_MSR ) data = ( data & MSR_DEBUGCHANGE ) | ( task -> thread . regs -> msr & ~ MSR_DEBUGCHANGE ) ; ( ( unsigned long * ) task -> thread . regs ) [ regno ] = data ; return 0 ; } return - EIO ; }
Write contents of register REGNO in task TASK.
Write contents of register REGNO in task TASK .