moss.kernel
Class MProcessor

java.lang.Object
  extended by moss.kernel.MProcessor

public class MProcessor
extends java.lang.Object

This class is used to represent a "virtual processor".


Field Summary
 int cpu
          which CPU, 0 = first
 
Constructor Summary
MProcessor(int n)
          constructor
 
Method Summary
static int currentCPU()
          returns the virtual CPU number of the currently running process.
static void finalinit()
          called to do final initialisation (in the context of the init-task)
 java.lang.String get_processor_id()
          returns the "processor ID" string
 boolean is_idle()
          tests whether the processor is idle or not
 void set_process(MProcess current)
          sets the currently executing process of this processor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cpu

public int cpu
which CPU, 0 = first

Constructor Detail

MProcessor

public MProcessor(int n)
constructor

Parameters:
n - processor number
Method Detail

finalinit

public static void finalinit()
called to do final initialisation (in the context of the init-task)


currentCPU

public static int currentCPU()
returns the virtual CPU number of the currently running process.

Returns:
processor number

set_process

public void set_process(MProcess current)
sets the currently executing process of this processor

Parameters:
current - process now running on this processor. if null, means the processor is going idle.

is_idle

public boolean is_idle()
tests whether the processor is idle or not

Returns:
true if idle, false if active

get_processor_id

public java.lang.String get_processor_id()
returns the "processor ID" string

Returns:
processor ID string