It has been pointed out to me that the thread_fork spl patch I posted
doesn't compile.
It says splx(spl), and ought to say splx(s).
Let this be a lesson to everybody to *never* issue or commit a fix, no
matter how trivial, without compiling and testing it.
sigh.
I've corrected the version on the web site.
--
- David A. Holland / dholland(a)eecs.harvard.edu
There are a couple recommended changes you might want to make before
you start on assignment 3.
The first corrects a failure to restore spl on error in thread_fork;
the second concerns some incorrect option codes in testbin/crash.
Both of these problems were noted and reported by sharp-eyed
students. Many of you have probably already corrected the thread_fork
issue in the course of doing assignment 2.
The thread_fork patch included here may not apply to your sources due
to assignment 2 changes, so treat it as advisory and (if necessary)
make the change yourself in whatever way makes the most sense.
Neither of these patches is urgent.
The patches follow. They will also appear on the web site.
Index: kern/thread/thread.c
===================================================================
RCS file: /disk/disk0/cs161/CVSREPO/os161/src/kern/thread/thread.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- thread.c 2002/02/15 23:32:28 1.21
+++ thread.c 2002/03/05 21:58:22 1.22
@@ -318,6 +318,7 @@
return 0;
fail:
+ splx(spl);
if (newguy->cwd != NULL) {
VOP_DECREF(newguy->cwd);
}
Index: testbin/crash/crash.c
===================================================================
RCS file: /disk/disk0/cs161/CVSREPO/os161/src/testbin/crash/crash.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- crash.c 2002/02/08 21:59:37 1.5
+++ crash.c 2002/03/05 21:58:55 1.6
@@ -178,9 +178,9 @@
{ 'j', "jump to kernel address", jump_to_kernel },
{ 'k', "alignment error", alignment_error },
{ 'l', "illegal instruction", illegal_instruction },
- { 'l', "divide by zero", divide_by_zero },
- { 'm', "mod by zero", mod_by_zero },
- { 'n', "Recurse infinitely", recurse_inf },
+ { 'm', "divide by zero", divide_by_zero },
+ { 'n', "mod by zero", mod_by_zero },
+ { 'o', "Recurse infinitely", recurse_inf },
{ 0, NULL, NULL }
};
--
- David A. Holland / dholland(a)eecs.harvard.edu