aboutsummaryrefslogtreecommitdiff
path: root/arch/um/os-Linux
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-10-16 01:27:18 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 09:43:07 -0700
commitf0c4cad99c12f08cb2a6cd0255911b2a93c57707 (patch)
tree1687ef2577bc7429955e8642fe8340ff2292817c /arch/um/os-Linux
parent54fa0ba40698af6d6735ade024293bb51cc4d4b3 (diff)
uml: style fixes in FP code
Tidy the code affected by the floating point fixes. A bunch of unused stuff is gone, including two sigcontext.c files, which turned out to be entirely unneeded. There are the usual fixes - whitespace and style cleanups copyright updates emacs formatting comments gone include cleanups adding severities to printks Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/os-Linux')
-rw-r--r--arch/um/os-Linux/sys-i386/registers.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/arch/um/os-Linux/sys-i386/registers.c b/arch/um/os-Linux/sys-i386/registers.c
index 8f1f0ab639b..d1997ca76e5 100644
--- a/arch/um/os-Linux/sys-i386/registers.c
+++ b/arch/um/os-Linux/sys-i386/registers.c
@@ -1,49 +1,55 @@
/*
* Copyright (C) 2004 PathScale, Inc
+ * Copyright (C) 2004 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/
#include <errno.h>
-#include <sysdep/ptrace_user.h>
+#include "kern_constants.h"
#include "longjmp.h"
#include "user.h"
+#include "sysdep/ptrace_user.h"
int save_fp_registers(int pid, unsigned long *fp_regs)
{
- if(ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0)
+ if (ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0)
return -errno;
return 0;
}
int restore_fp_registers(int pid, unsigned long *fp_regs)
{
- if(ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0)
+ if (ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0)
return -errno;
return 0;
}
int save_fpx_registers(int pid, unsigned long *fp_regs)
{
- if(ptrace(PTRACE_GETFPXREGS, pid, 0, fp_regs) < 0)
+ if (ptrace(PTRACE_GETFPXREGS, pid, 0, fp_regs) < 0)
return -errno;
return 0;
}
int restore_fpx_registers(int pid, unsigned long *fp_regs)
{
- if(ptrace(PTRACE_SETFPXREGS, pid, 0, fp_regs) < 0)
+ if (ptrace(PTRACE_SETFPXREGS, pid, 0, fp_regs) < 0)
return -errno;
return 0;
}
unsigned long get_thread_reg(int reg, jmp_buf *buf)
{
- switch(reg){
- case EIP: return buf[0]->__eip;
- case UESP: return buf[0]->__esp;
- case EBP: return buf[0]->__ebp;
+ switch (reg) {
+ case EIP:
+ return buf[0]->__eip;
+ case UESP:
+ return buf[0]->__esp;
+ case EBP:
+ return buf[0]->__ebp;
default:
- printk("get_thread_regs - unknown register %d\n", reg);
+ printk(UM_KERN_ERR "get_thread_regs - unknown register %d\n",
+ reg);
return 0;
}
}