summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore59
-rw-r--r--doc/.gitignore4
-rw-r--r--i386/i386/.gitignore1
-rw-r--r--i386/i386/locore.h34
-rw-r--r--i386/i386/pcb.c2
-rw-r--r--i386/i386/pcb.h2
-rw-r--r--i386/i386/trap.c21
-rw-r--r--tests/.gitignore1
8 files changed, 65 insertions, 59 deletions
diff --git a/.gitignore b/.gitignore
index fe5d53a..4488bc2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,38 +1,39 @@
-.deps
+*~
+
+.deps/
.dirstamp
-.Tpo
*.o
*.a
-*.defs.*
+/gnumach
+/gnumach-undef
+/gnumach-undef-bad
+/gnumach.msgids
+
+# Makerules.am
+*.gz
+*.stripped
+
+# Makerules.mig.am
*.user.*
*.server.*
-*.info
-*.info-*
+
autom4te.cache/
build-aux/
-mach/
-INSTALL
-Makefile
-Makefile.in
-aclocal.m4
-config.h*
-config.log
-config.status
-config.status.orig
-configure
-gnumach
-gnumach-undef
-gnumach-undef-bad
-gnumach.msgids
-stamp-h1
-stamp-vti
-version.c
-version.texi
-
-i386/i386/i386asm.h
-tests/test-mbchk
+/INSTALL
+/Makefile
+/Makefile.in
+/aclocal.m4
+/config.h
+/config.h.in
+/config.log
+/config.status
+/config.status.orig
+/configure
+/stamp-h1
+/version.c
# Ignore arch symlinks
-machine
-linux/src/include/asm
-linux/dev/include/asm
+/machine
+/mach/machine
+/linux/src/include/asm
+/linux/dev/include/asm
diff --git a/doc/.gitignore b/doc/.gitignore
new file mode 100644
index 0000000..829355b
--- /dev/null
+++ b/doc/.gitignore
@@ -0,0 +1,4 @@
+/*.info
+/*.info-*
+/stamp-vti
+/version.texi
diff --git a/i386/i386/.gitignore b/i386/i386/.gitignore
new file mode 100644
index 0000000..4520a2a
--- /dev/null
+++ b/i386/i386/.gitignore
@@ -0,0 +1 @@
+/i386asm.h
diff --git a/i386/i386/locore.h b/i386/i386/locore.h
index b649726..bfd1317 100644
--- a/i386/i386/locore.h
+++ b/i386/i386/locore.h
@@ -1,6 +1,5 @@
/*
- * Header file for printf type functions.
- * Copyright (C) 2006 Free Software Foundation.
+ * Copyright (C) 2006, 2011 Free Software Foundation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,18 +23,37 @@
#include <kern/sched_prim.h>
-extern int copyin (const void *userbuf, void *kernelbuf, size_t cn);
+/*
+ * Fault recovery in copyin/copyout routines.
+ */
+struct recovery {
+ int fault_addr;
+ int recover_addr;
+};
-extern int copyinmsg (const void *userbuf, void *kernelbuf, size_t cn);
+extern struct recovery recover_table[];
+extern struct recovery recover_table_end[];
-extern int copyout (const void *kernelbuf, void *userbuf, size_t cn);
+/*
+ * Recovery from Successful fault in copyout does not
+ * return directly - it retries the pte check, since
+ * the 386 ignores write protection in kernel mode.
+ */
+extern struct recovery retry_table[];
+extern struct recovery retry_table_end[];
+
+
+extern int call_continuation (continuation_t continuation);
+extern int discover_x86_cpu_type (void);
+
+extern int copyin (const void *userbuf, void *kernelbuf, size_t cn);
+extern int copyinmsg (const void *userbuf, void *kernelbuf, size_t cn);
+extern int copyout (const void *kernelbuf, void *userbuf, size_t cn);
extern int copyoutmsg (const void *kernelbuf, void *userbuf, size_t cn);
extern int inst_fetch (int eip, int cs);
-extern int call_continuation (continuation_t continuation);
-
extern void cpu_shutdown (void);
extern unsigned int cpu_features[1];
@@ -72,7 +90,5 @@ extern unsigned int cpu_features[1];
#define CPU_HAS_FEATURE(feature) (cpu_features[(feature) / 32] & (1 << ((feature) % 32)))
-extern int discover_x86_cpu_type (void);
-
#endif /* _MACHINE__LOCORE_H_ */
diff --git a/i386/i386/pcb.c b/i386/i386/pcb.c
index 7f2b3c8..fffa92a 100644
--- a/i386/i386/pcb.c
+++ b/i386/i386/pcb.c
@@ -78,7 +78,7 @@ vm_offset_t kernel_stack[NCPUS]; /* top of active_stack */
void stack_attach(thread, stack, continuation)
register thread_t thread;
register vm_offset_t stack;
- void (*continuation)();
+ void (*continuation)(thread_t);
{
counter(if (++c_stacks_current > c_stacks_max)
c_stacks_max = c_stacks_current);
diff --git a/i386/i386/pcb.h b/i386/i386/pcb.h
index f8671a2..21bdfd9 100644
--- a/i386/i386/pcb.h
+++ b/i386/i386/pcb.h
@@ -64,7 +64,7 @@ extern void load_context (thread_t new);
extern void stack_attach (
thread_t thread,
vm_offset_t stack,
- void (*continuation)());
+ void (*continuation)(thread_t));
extern vm_offset_t stack_detach (thread_t thread);
diff --git a/i386/i386/trap.c b/i386/i386/trap.c
index 90d4c31..01c83f5 100644
--- a/i386/i386/trap.c
+++ b/i386/i386/trap.c
@@ -123,25 +123,6 @@ user_page_fault_continue(kr)
/*NOTREACHED*/
}
-/*
- * Fault recovery in copyin/copyout routines.
- */
-struct recovery {
- int fault_addr;
- int recover_addr;
-};
-
-extern struct recovery recover_table[];
-extern struct recovery recover_table_end[];
-
-/*
- * Recovery from Successful fault in copyout does not
- * return directly - it retries the pte check, since
- * the 386 ignores write protection in kernel mode.
- */
-extern struct recovery retry_table[];
-extern struct recovery retry_table_end[];
-
static char *trap_type[] = {
"Divide error",
@@ -296,6 +277,7 @@ dump_ss(regs);
*/
register struct recovery *rp;
+ /* Linear searching; but the list is small enough. */
for (rp = retry_table; rp < retry_table_end; rp++) {
if (regs->eip == rp->fault_addr) {
regs->eip = rp->recover_addr;
@@ -312,6 +294,7 @@ dump_ss(regs);
{
register struct recovery *rp;
+ /* Linear searching; but the list is small enough. */
for (rp = recover_table;
rp < recover_table_end;
rp++) {
diff --git a/tests/.gitignore b/tests/.gitignore
new file mode 100644
index 0000000..6e86af1
--- /dev/null
+++ b/tests/.gitignore
@@ -0,0 +1 @@
+/test-mbchk