nachos.network
Class NetProcess
java.lang.Object
|
+--nachos.userprog.UserProcess
|
+--nachos.vm.VMProcess
|
+--nachos.network.NetProcess
- public class NetProcess
- extends VMProcess
A VMProcess that supports networking syscalls.
|
Constructor Summary |
NetProcess()
Allocate a new process. |
|
Method Summary |
int |
handleSyscall(int syscall,
int a0,
int a1,
int a2,
int a3)
Handle a syscall exception. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
NetProcess
public NetProcess()
- Allocate a new process.
handleSyscall
public int handleSyscall(int syscall,
int a0,
int a1,
int a2,
int a3)
- Handle a syscall exception. Called by handleException(). The
syscall argument identifies which syscall the user executed:
| syscall# | syscall prototype |
| 11 | int connect(int host, int port); |
| 12 | int accept(int port); |
- Overrides:
- handleSyscall in class VMProcess
- Parameters:
syscall - the syscall number.a0 - the first syscall argument.a1 - the second syscall argument.a2 - the third syscall argument.a3 - the fourth syscall argument.- Returns:
- the value to be returned to the user.