Module Name:    src
Committed By:   reinoud
Date:           Sun Sep  4 21:01:39 UTC 2011

Modified Files:
        src/sys/arch/usermode/dev: cpu.c
        src/sys/arch/usermode/include: pcb.h
        src/sys/arch/usermode/usermode: trap.c

Log Message:
pcb->errno to pcb->pcb_errno


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/usermode/dev/cpu.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/usermode/include/pcb.h
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/usermode/usermode/trap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/usermode/dev/cpu.c
diff -u src/sys/arch/usermode/dev/cpu.c:1.28 src/sys/arch/usermode/dev/cpu.c:1.29
--- src/sys/arch/usermode/dev/cpu.c:1.28	Sun Sep  4 20:54:52 2011
+++ src/sys/arch/usermode/dev/cpu.c	Sun Sep  4 21:01:39 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.28 2011/09/04 20:54:52 reinoud Exp $ */
+/* $NetBSD: cpu.c,v 1.29 2011/09/04 21:01:39 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
@@ -29,7 +29,7 @@
 #include "opt_cpu.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.28 2011/09/04 20:54:52 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.29 2011/09/04 21:01:39 reinoud Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -188,14 +188,14 @@
 	curlwp = newlwp;
 
 	if (oldpcb) {
-		oldpcb->errno = thunk_geterrno();
+		oldpcb->pcb_errno = thunk_geterrno();
 		if (thunk_swapcontext(&oldpcb->pcb_ucp, &newpcb->pcb_ucp))
 			panic("swapcontext failed");
 	} else {
 		if (thunk_setcontext(&newpcb->pcb_ucp))
 			panic("setcontext failed");
 	}
-	thunk_seterrno(newpcb->errno);
+	thunk_seterrno(newpcb->pcb_errno);
 
 #ifdef CPU_DEBUG
 	printf("cpu_switchto: returning %p (was %p)\n", ci->ci_stash, oldlwp);

Index: src/sys/arch/usermode/include/pcb.h
diff -u src/sys/arch/usermode/include/pcb.h:1.9 src/sys/arch/usermode/include/pcb.h:1.10
--- src/sys/arch/usermode/include/pcb.h:1.9	Sun Sep  4 20:54:52 2011
+++ src/sys/arch/usermode/include/pcb.h	Sun Sep  4 21:01:39 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pcb.h,v 1.9 2011/09/04 20:54:52 reinoud Exp $ */
+/* $NetBSD: pcb.h,v 1.10 2011/09/04 21:01:39 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
@@ -52,7 +52,7 @@
 	struct trapframe pcb_tf;
 	void *		 pcb_onfault;		/* on fault handler */
 
-	int		 errno;			/* save/restore place */
+	int		 pcb_errno;		/* save/restore place */
 };
 
 #endif /* !_ARCH_USERMODE_INCLUDE_PCB_H */

Index: src/sys/arch/usermode/usermode/trap.c
diff -u src/sys/arch/usermode/usermode/trap.c:1.22 src/sys/arch/usermode/usermode/trap.c:1.23
--- src/sys/arch/usermode/usermode/trap.c:1.22	Sun Sep  4 20:54:52 2011
+++ src/sys/arch/usermode/usermode/trap.c	Sun Sep  4 21:01:39 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.22 2011/09/04 20:54:52 reinoud Exp $ */
+/* $NetBSD: trap.c,v 1.23 2011/09/04 21:01:39 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Reinoud Zandijk <rein...@netbsd.org>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.22 2011/09/04 20:54:52 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.23 2011/09/04 21:01:39 reinoud Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -125,7 +125,7 @@
 		onfault = pcb->pcb_onfault;
 		vm = p->p_vmspace;
 
-		pcb->errno = thunk_geterrno();
+		pcb->pcb_errno = thunk_geterrno();
 #if 0
 		va = (vaddr_t) info->si_addr;
 		printf("mem trap lwp = %p pid = %d lid = %d, va = %p\n",
@@ -216,7 +216,7 @@
 			/* XXX HOWTO see arm/arm/syscall.c illegal instruction signal */
 		}
 
-		thunk_seterrno(pcb->errno);
+		thunk_seterrno(pcb->pcb_errno);
 	}
 	if (recurse > 1)
 		printf("leaving trap recursion level %d\n", recurse);

Reply via email to