TD2 question I.4
Create userthread.cc content and call it from exception.cc
This commit is contained in:
parent
f18dd05339
commit
c4a2d25163
4 changed files with 28 additions and 1 deletions
|
@ -25,6 +25,10 @@
|
|||
#include "system.h"
|
||||
#include "syscall.h"
|
||||
|
||||
#ifdef CHANGED
|
||||
#include "userthread.h"
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// UpdatePC : Increments the Program Counter register in order to resume
|
||||
// the user program immediately after the "syscall" instruction.
|
||||
|
@ -210,6 +214,9 @@ ExceptionHandler (ExceptionType which)
|
|||
}
|
||||
case SC_ThreadCreate:
|
||||
{
|
||||
int f = machine->ReadRegister(4);
|
||||
int args = machine->ReadRegister(5);
|
||||
do_ThreadCreate(f, args);
|
||||
break;
|
||||
}
|
||||
case SC_ThreadExit:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue