Appendix A
Low-level Nested Process Model API in Alta

The public interfaces for the following classes, which comprise the Alta kernel interface, are listed in this appendix. For each class, any public fields, constructors and methods are listed.

Classes


edu.utah.npm.core.ClassHandle
edu.utah.npm.core.Cond
edu.utah.npm.core.Debug
edu.utah.npm.core.IPC
edu.utah.npm.core.IPCPayload
edu.utah.npm.core.IPCWaitReceiveReturn
edu.utah.npm.core.MemPool
edu.utah.npm.core.Mutex
edu.utah.npm.core.Port
edu.utah.npm.core.PortSet
edu.utah.npm.core.Reference
edu.utah.npm.core.Space
edu.utah.npm.core.Thread

final class edu.utah.npm.core.ClassHandle:

Constructors:


ClassHandle()

Methods:


final void ClassHandle()
final void ClassHandle(Class c)
final void useClass(Class cl)
final void disallow()
final boolean useWhatIUse(String name)

final class edu.utah.npm.core.Cond:
Extends Refable

Constructors:


Cond()
Cond(int hashCode)

Methods:


void wait(Mutex mutex)
void signal()
void broadcast()
void destroy()
String toString()
void finalize()

final class edu.utah.npm.core.Debug:

Constructors:


Debug()

Methods:


static void assertCheck(boolean expr, String exprStr, String file, int line)
static void assertCheck(Object ref, String exprStr, String file, int line)
static void dumpStats()
static void println(String str)
static void print(String str)
static void printInt(int i)
static void printIntHex(int i)
static void printIPCOps(byte ops)
static void printCharArray(char[] array, int start, int end)
static void exit()
static void threadInfo(Thread th)
static void printStackTrace()
static boolean doTrace(int flag)
static void otsan()
static void otsan(String str)
static void notImplemented()
static void notImplemented(String expl)
static void dPanic(String str)

final class edu.utah.npm.core.IPC:

Fields:


static final int RC_OK;
static final int RC_CONNECT_INVALIDDEST;
static final int RC_ACK_DISCONNECTED;
static final int RC_SEND_DISCONNECTED;
static final int RC_OVER_DISCONNECTED;
static final int RC_RECV_DISCONNECTED;
static final int RC_RECV_MOREDATA;
static final int RC_RECV_MOREREFS;
static final int RC_RECV_MOREOBJS;
static final int RC_RECV_REVERSED;

Methods:


static final int clientConnectSend(Reference destPortRef, IPCPayload payload)
static final int clientAckSend(IPCPayload payload)
static final int clientSend(IPCPayload payload)
static final int clientConnectSendOverReceive(Reference destPortRef, IPC- Payload payload)
static final int clientAckSendOverReceive(IPCPayload payload)
static final int clientSendOverReceive(IPCPayload payload)
static final int clientOverReceive(IPCPayload payload)
static final int clientReceive(IPCPayload payload)
static final int clientDisconnect()
static final int clientAlert()
static final int serverAckSend(IPCPayload payload)
static final int serverSend(IPCPayload payload)
static final void serverAckSendWaitReceive(IPCPayload payload, IPCWait- ReceiveReturn out_rc)
static final int serverAckSendOverReceive(IPCPayload payload)
static final void serverSetupWaitReceive(IPCPayload payload, PortSet pset, IPCWaitReceiveReturn out_rc)
static final void serverWaitReceive(IPCPayload payload, IPCWaitReceive- Return out_rc)
static final void serverSendWaitReceive(IPCPayload payload, IPCWait- ReceiveReturn out_rc)
static final int serverSendOverReceive(IPCPayload payload)
static final int serverOverReceive(IPCPayload payload)
static final int serverReceive(IPCPayload payload)
static final int serverDisconnect()
static final int serverAlert()
static final String errorToString(int rc)

class edu.utah.npm.core.IPCPayload:

Fields:


byte[] sendBuf;
int sendBufStart;
int sendBufEnd;
byte[] recvBuf;
int recvBufStart;
int recvBufEnd;
Reference[] sendRefTab;
int sendRefTabStart;
int sendRefTabEnd;
Reference[] recvRefTab;
int recvRefTabStart;
int recvRefTabEnd;
Object[] sendObjTab;
int sendObjTabStart;
int sendObjTabEnd;
Object[] recvObjTab;
int recvObjTabStart;
int recvObjTabEnd;

Constructors:


IPCPayload()

class edu.utah.npm.core.IPCWaitReceiveReturn:

Fields:


int rc;
Object alias;

Constructors:


IPCWaitReceiveReturn()

final class edu.utah.npm.core.MemPool:
Extends edu.utah.npm.core.Refable

Constructors:


MemPool(long size, Reference pPoolRef, Reference spaceRef, Reference keeperPortRef)
MemPool(long size, Reference pPoolRef, Reference spaceRef, Reference keeperPortRef, int hashCode)

Methods:


long getSize()
long getAvailable()
void destroy()
String toString()

final class edu.utah.npm.core.Mutex:
Extends edu.utah.npm.core.Refable

Constructors:


Mutex()
Mutex(int hashCode)

Methods:


void destroy()
void lock()
void unlock()
boolean trylock()
String toString()

class edu.utah.npm.core.Port:
Extends edu.utah.npm.core.Refable

Constructors:


Port(Object alias, Reference portSet)
Port(Object alias, Reference portSet, int hashCode)

Methods:


void setAlias(Object alias)
void destroy()
String toString()

final class edu.utah.npm.core.PortSet:
Extends edu.utah.npm.core.Refable

Constructors:


PortSet()
PortSet(int hashCode)

Methods:


void destroy()
String toString()

final class edu.utah.npm.core.Reference:
Extends edu.utah.npm.core.NPMObject

Fields:


static final Reference NullReference;

Constructors:


Reference()
Reference(Refable refObj)
Reference(int hashCode)
Reference(Refable refObj, int hashCode)

Methods:


Class type()
void destroy()
boolean compare(Reference otherRef)
boolean equals(Object obj)
void nullify()
boolean check()
String toString()

final class edu.utah.npm.core.Space:
Extends edu.utah.npm.core.Refable

Constructors:


Space(Reference keeperPort, Reference memPool)
Space(Reference keeperPort, Reference memPool, int hashCode)

Methods:


static Reference currentTaskKeeperPort(Reference out_ref)
static Reference currentTaskMemPool(Reference out_ref)
void startMain(String threadName, String initialObj, String[] initialArgs)
void destroy()
String toString()

class edu.utah.npm.core.Thread:
Extends edu.utah.npm.core.Refable

Constructors:


Thread(Reference spaceRef, Reference schedPortRef, Reference clientRef, Reference serverRef)
Thread(Reference spaceRef, Reference schedPortRef, Reference clientRef, Reference serverRef, int hashCode)

Methods:


static final void nullsyscall()
static final Thread self()
static final void interrupt(Thread thread)
static final boolean interrupted(Thread thread)
final boolean getClient(Reference out_clientThreadRef)
final void setClient(Reference clientThreadRef, boolean isSender)
final boolean getServer(Reference out_serverThreadRef)
final void setServer(Reference serverThreadRef, boolean isSender)
final void destroy()
static final void cancel(Thread th)
String toString()
String debugInfo()

class edu.utah.npm.core.Exception:
Extends java.lang.Exception

Constructors:


Exception()
Exception(String message)

class edu.utah.npm.core.Cancelation:
Extends java.lang.Error

Constructors:


Cancelation()
Cancelation(String message)

class edu.utah.npm.core.DestroyedObjectError:
Extends edu.utah.npm.core.InvalidObjectError

Constructors:


DestroyedObjectError()
DestroyedObjectError(String detail)

class edu.utah.npm.core.Error:
Extends java.lang.Error

Constructors:


Error()
Error(String message)

class edu.utah.npm.core.Insanity:
Extends java.lang.Error

Constructors:


Insanity()
Insanity(String message)

class edu.utah.npm.core.InvalidObjectError:
Extends edu.utah.npm.core.Insanity

Constructors:


InvalidObjectError()
InvalidObjectError(String detail)