|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
moss.kernel.MProcess
public class MProcess
The MProcess class is effectively the process control block, it extends Thread so it can exist on its own.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
java.lang.String[] |
cmdline
command-line arguments |
MEnv |
environ
process environment |
MFile[] |
files
array of open files (indexed by descriptor) |
static int |
INHERIT_OPEN_FILES
|
MKernelProcess |
kernel_if
handle on a system-process |
boolean |
ktask
if true, a kernel-only process |
MProcess |
next
previous and next processes on the run-queue |
MProcess |
next_task
prev_task and next_task are a linked list of all processes |
MProcess |
parent
link to parent process |
MSignal |
pending_signals
queue of pending signals |
moss.kernel.MProcess.PFS_mprocess |
pfslink
link to the proc-filesystem info handler |
int |
pid
process id |
int |
ppid
parent process id -- this is not used for active processes |
MProcess |
prev
previous and next processes on the run-queue |
MProcess |
prev_task
prev_task and next_task are a linked list of all processes |
MProcess |
q_next
next process on a wait queue |
int[] |
sig_handling
signal-handling states |
boolean |
signalled
true if the process has been signalled (allows drivers/etc. |
Semaphore |
start_sem
a semaphore used to synchronize process startup |
int |
state
state holds the process's state (STOPPED, RUNNING, etc.) |
java.lang.String |
syscall
string indicating what system-call the process is doing |
static int |
TASK_FINISHED
|
static int |
TASK_INVALID
|
static int |
TASK_RUNNABLE
|
static int |
TASK_RUNNING
|
static int |
TASK_SLEEPING
|
static int |
TASK_STOPPED
|
static int |
TASK_ZOMBIE
|
int |
umask
the process's file creation mask |
MUserProcess |
user_if
handle on a user-process |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
MProcess()
MProcess constructor. |
|
MProcess(MProcess parent)
MProcess constructor |
|
| Method Summary | |
|---|---|
static int |
create_kernel_process(java.lang.String name,
java.lang.String[] args)
creates a new kernel process and adds it to the run-queue |
static int |
create_user_process(java.lang.String name,
MProcess parent,
java.lang.String[] args,
int flags)
creates a new user process and adds it to the run-queue |
void |
run()
thread "run" method for an MProcess |
static void |
shutdown_process(MProcess p)
this is used to tidy-up a process that's shutting down. |
static boolean |
sync_process_signals(MProcess p)
this method is used by MPosixIf to deliver signals to a process. |
void |
terminate_process(int exitcode)
this is called by MPosixIf's exit() to force a process to terminate |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public MProcess prev
public MProcess next
public MProcess q_next
public MProcess prev_task
public MProcess next_task
public int state
public int[] sig_handling
public MSignal pending_signals
public boolean signalled
public int pid
public int ppid
public MProcess parent
public boolean ktask
public MFile[] files
public MUserProcess user_if
public MKernelProcess kernel_if
public java.lang.String[] cmdline
public Semaphore start_sem
public java.lang.String syscall
public int umask
public MEnv environ
public moss.kernel.MProcess.PFS_mprocess pfslink
public static final int TASK_INVALID
public static final int TASK_STOPPED
public static final int TASK_RUNNABLE
public static final int TASK_RUNNING
public static final int TASK_SLEEPING
public static final int TASK_FINISHED
public static final int TASK_ZOMBIE
public static final int INHERIT_OPEN_FILES
| Constructor Detail |
|---|
public MProcess()
public MProcess(MProcess parent)
parent - parent process| Method Detail |
|---|
public static int create_user_process(java.lang.String name,
MProcess parent,
java.lang.String[] args,
int flags)
name - name of the class that provides the processparent - parent processargs - arguments to be passed to the new processflags - process creation flags (INHERIT_...)
public static int create_kernel_process(java.lang.String name,
java.lang.String[] args)
name - name of the class that provides the processargs - arguments to be passed to the new process
public static void shutdown_process(MProcess p)
p - process shutting downpublic void terminate_process(int exitcode)
exitcode - exit-code of the processpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic static boolean sync_process_signals(MProcess p)
p - process to handle signals for
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||