summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--i386/i386/pcb.c13
2 files changed, 18 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index b4fa29ed..8c79b043 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-11-09 Marcus Brinkmann <marcus@gnu.org>
+
+ * i386/i386/pcb.c (switch_context): Update the I/O permission
+ bitmap from stack_handoff() here (not only in stack_handoff()).
+
2002-11-05 Roland McGrath <roland@frob.com>
* oskit/pc/osenv_bell.c (direct_cons_bell): Use a private timer
diff --git a/i386/i386/pcb.c b/i386/i386/pcb.c
index cd9ecdc6..f83d22ed 100644
--- a/i386/i386/pcb.c
+++ b/i386/i386/pcb.c
@@ -313,6 +313,19 @@ thread_t switch_context(old, continuation, new)
old, mycpu);
PMAP_ACTIVATE_USER(vm_map_pmap(new_task->map),
new, mycpu);
+
+ simple_lock (&new_task->machine.iopb_lock);
+#if NCPUS>1
+#warning SMP support missing (avoid races with io_perm_modify).
+#else
+ /* This optimization only works on a single processor
+ machine, where old_task's iopb can not change while
+ we are switching. */
+ if (old_task->machine.iopb || new_task->machine.iopb)
+#endif
+ update_ktss_iopb (new_task->machine.iopb,
+ new_task->machine.iopb_size);
+ simple_unlock (&new_task->machine.iopb_lock);
}
}