|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectLibrary
Convenience calls for using the Kernel. Each function in this class makes a system call. Sometimes, the arguments are manipulated to make their user representation more convenient. Note that this class contains only static methods. All methods return integers. Negative return values are error codes. Some methods return positive values; others simply return 0 to mean "ok".
Kernel
Field Summary | |
static String[] |
errorMessage
A table of error messages corresponding to Kernel error return codes. |
Constructor Summary | |
private |
Library()
This private constructor ensures that no instances of Library are ever created. |
Method Summary | |
static int |
exec(String command,
String[] args)
Performs SYSCALL_EXEC. |
static int |
input(StringBuffer result)
Performs SYSCALL_INPUT. |
static int |
join(int pid)
Performs SYSCALL_JOIN. |
static int |
output(String s)
Performs SYSCALL_OUTPUT. |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String[] errorMessage
rc = Kernel.interrupt(Kernel.INTERRUPT_USER, ... )and rc is less than 0.
Constructor Detail |
private Library()
Method Detail |
public static int output(String s)
s
- a String to display
public static int input(StringBuffer result)
result
- a place to put the result
public static int exec(String command, String[] args)
command
- The name of a Java class to execute.args
- The arguments to give the new program
public static int join(int pid)
pid
- a process id returned by a previous call to exec.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |