public abstract class SysCall extends Object
All methods of this class have the following signature:
public abstract <TYPE> NAME(<args to pass to sysNAME via native calling convention>)which will call the corresponding method in system call trampoline with the added function address from the boot image.
NOTE: From the standpoint of the rest of the VM, an invocation to a method of SysCall is uninterruptible.
NOTE: There must be a matching field NAMEIP in BootRecord.java for each method declared here.
Modifier and Type | Field and Description |
---|---|
static SysCall |
sysCall
Actual implementation of the SysCall class.
|
Constructor and Description |
---|
SysCall() |
Modifier and Type | Method and Description |
---|---|
abstract Address |
gcspyDriverAddStream(Address driver,
int id) |
abstract void |
gcspyDriverEndOutput(Address driver) |
abstract void |
gcspyDriverInit(Address driver,
int id,
Address serverName,
Address driverName,
Address title,
Address blockInfo,
int tileNum,
Address unused,
int mainSpace) |
abstract void |
gcspyDriverInitOutput(Address driver) |
abstract void |
gcspyDriverResize(Address driver,
int size) |
abstract void |
gcspyDriverSetTileName(Address driver,
int i,
Address start,
long value) |
abstract void |
gcspyDriverSetTileNameRange(Address driver,
int i,
Address start,
Address end) |
abstract void |
gcspyDriverSpaceInfo(Address driver,
Address info) |
abstract void |
gcspyDriverStartComm(Address driver) |
abstract void |
gcspyDriverStream(Address driver,
int id,
int len) |
abstract void |
gcspyDriverStreamByteValue(Address driver,
byte value) |
abstract void |
gcspyDriverStreamIntValue(Address driver,
int value) |
abstract void |
gcspyDriverStreamShortValue(Address driver,
short value) |
abstract void |
gcspyDriverSummary(Address driver,
int id,
int len) |
abstract void |
gcspyDriverSummaryValue(Address driver,
int value) |
abstract void |
gcspyFormatSize(Address buffer,
int size) |
abstract void |
gcspyIntWriteControl(Address driver,
int id,
int tileNum) |
abstract Address |
gcspyMainServerAddDriver(Address addr) |
abstract void |
gcspyMainServerAddEvent(Address server,
int event,
Address name) |
abstract Address |
gcspyMainServerInit(int port,
int len,
Address name,
int verbose) |
abstract int |
gcspyMainServerIsConnected(Address server,
int event) |
abstract Address |
gcspyMainServerOuterLoop() |
abstract void |
gcspyMainServerSafepoint(Address server,
int event) |
abstract void |
gcspyMainServerSetGeneralInfo(Address server,
Address info) |
abstract void |
gcspyMainServerStartCompensationTimer(Address server) |
abstract void |
gcspyMainServerStopCompensationTimer(Address server) |
abstract int |
gcspySprintf(Address str,
Address format,
Address value) |
abstract void |
gcspyStartserver(Address server,
int wait,
Address serverOuterLoop) |
abstract void |
gcspyStreamInit(Address stream,
int id,
int dataType,
Address name,
int minValue,
int maxValue,
int zeroValue,
int defaultValue,
Address pre,
Address post,
int presentation,
int paintStyle,
int maxStreamIndex,
int red,
int green,
int blue) |
abstract int |
sysArg(int argno,
byte[] buf,
int buflen) |
abstract Address |
sysCalloc(int length) |
abstract void |
sysConsoleWriteChar(char v) |
abstract void |
sysConsoleWriteDouble(double value,
int postDecimalDigits) |
abstract void |
sysConsoleWriteInteger(int value,
int hexToo) |
abstract void |
sysConsoleWriteLong(long value,
int hexToo) |
abstract void |
sysCopy(Address dst,
Address src,
Extent cnt)
Copies memory.
|
abstract long |
sysCurrentTimeMillis() |
abstract void |
sysDisableAlignmentChecking() |
abstract Address |
sysDlopen(byte[] libname) |
abstract Address |
sysDlsym(Address libHandler,
byte[] symbolName) |
abstract double |
sysDoubleRemainder(double x,
double y) |
abstract int |
sysDoubleToInt(double x) |
abstract long |
sysDoubleToLong(double x) |
abstract void |
sysEnableAlignmentChecking() |
abstract void |
sysExit(int value) |
abstract int |
sysFloatToInt(float x) |
abstract long |
sysFloatToLong(float x) |
abstract void |
sysFree(Address location) |
abstract int |
sysGetenv(byte[] varName,
byte[] buf,
int limit) |
abstract Word |
sysGetThreadId() |
abstract int |
sysGetThreadPriority(Word thread,
Word handle) |
abstract Word |
sysGetThreadPriorityHandle() |
abstract long |
sysLongDivide(long x,
long y) |
abstract long |
sysLongRemainder(long x,
long y) |
abstract double |
sysLongToDouble(long x) |
abstract float |
sysLongToFloat(long x) |
abstract Address |
sysMalloc(int length) |
abstract void |
sysMemmove(Address dst,
Address src,
Extent cnt)
Copies memory without making any assumptions about the memory areas.
|
abstract Address |
sysMMap(Address start,
Extent length,
int protection,
int flags,
int fd,
Offset offset) |
abstract Address |
sysMMapErrno(Address start,
Extent length,
int protection,
int flags,
int fd,
Offset offset) |
abstract void |
sysMonitorBroadcast(Word monitor) |
abstract Word |
sysMonitorCreate()
Allocate the space for a pthread_mutex (using malloc) and initialize
it using pthread_mutex_init with the recursive mutex options.
|
abstract void |
sysMonitorDestroy(Word monitor)
Destroy the monitor pointed to by the argument and free its memory
by calling free.
|
abstract void |
sysMonitorEnter(Word monitor) |
abstract void |
sysMonitorExit(Word monitor) |
abstract void |
sysMonitorTimedWaitAbsolute(Word monitor,
long whenWakeupNanos) |
abstract void |
sysMonitorWait(Word monitor) |
abstract int |
sysMProtect(Address start,
Extent length,
int prot) |
abstract void |
sysNanoSleep(long howLongNanos) |
abstract long |
sysNanoTime() |
abstract int |
sysNumProcessors() |
abstract long |
sysParseMemorySize(byte[] sizeName,
byte[] sizeFlag,
byte[] defaultFactor,
int roundTo,
byte[] argToken,
byte[] subArg)
Primitive parsing of memory sizes, with proper error handling,
and so on.
|
abstract int |
sysPerfEventCreate(int id,
byte[] name) |
abstract void |
sysPerfEventDisable() |
abstract void |
sysPerfEventEnable() |
abstract int |
sysPerfEventInit(int events) |
abstract int |
sysPerfEventRead(int id,
long[] values) |
abstract float |
sysPrimitiveParseFloat(byte[] buf)
Used to parse command line arguments that are
doubles and floats early in booting before it
is safe to call Float.valueOf or Double.valueOf.
|
abstract int |
sysPrimitiveParseInt(byte[] buf)
Used to parse command line arguments that are
bytes and ints early in booting before it
is safe to call Byte.parseByte or Integer.parseInt.
|
abstract int |
sysReadByte(int fd) |
abstract int |
sysReadBytes(int fd,
Address buf,
int cnt) |
abstract void |
sysReportAlignmentChecking() |
abstract int |
sysSetThreadPriority(Word thread,
Word handle,
int priority) |
abstract int |
sysStashVMThread(RVMThread vmThread) |
abstract void |
sysSyncCache(Address address,
int size) |
abstract void |
sysThreadBind(int cpuId) |
abstract int |
sysThreadBindSupported()
Tells you if the current system supportes sysNativeThreadBind().
|
abstract Word |
sysThreadCreate(Address ip,
Address fp,
Address tr,
Address jtoc)
Creates a native thread (aka "unix kernel thread", "pthread").
|
abstract void |
sysThreadTerminate() |
abstract void |
sysThreadYield() |
abstract boolean |
sysVaArgJboolean(Address va_list) |
abstract byte |
sysVaArgJbyte(Address va_list) |
abstract char |
sysVaArgJchar(Address va_list) |
abstract double |
sysVaArgJdouble(Address va_list) |
abstract float |
sysVaArgJfloat(Address va_list) |
abstract int |
sysVaArgJint(Address va_list) |
abstract long |
sysVaArgJlong(Address va_list) |
abstract int |
sysVaArgJobject(Address va_list) |
abstract short |
sysVaArgJshort(Address va_list) |
abstract Address |
sysVaCopy(Address va_list) |
abstract void |
sysVaEnd(Address va_list) |
abstract int |
sysWriteByte(int fd,
int data) |
abstract int |
sysWriteBytes(int fd,
Address buf,
int cnt) |
abstract void |
sysZero(Address dst,
Extent cnt) |
abstract void |
sysZeroNT(Address dst,
Extent cnt) |
abstract void |
sysZeroPages(Address dst,
int cnt) |
public SysCall()
public abstract void sysConsoleWriteChar(char v)
public abstract void sysConsoleWriteInteger(int value, int hexToo)
public abstract void sysConsoleWriteLong(long value, int hexToo)
public abstract void sysConsoleWriteDouble(double value, int postDecimalDigits)
public abstract void sysExit(int value)
public abstract int sysArg(int argno, byte[] buf, int buflen)
public abstract int sysGetenv(byte[] varName, byte[] buf, int limit)
public abstract void sysCopy(Address dst, Address src, Extent cnt)
Assumption: the memory regions do not overlap. Use
sysMemmove(Address, Address, Extent)
if the regions might overlap.
dst
- destination addresssrc
- source addresscnt
- number of bytes to copypublic abstract void sysMemmove(Address dst, Address src, Extent cnt)
dst
- destination addresssrc
- source addresscnt
- number of bytes to copypublic abstract void sysZeroPages(Address dst, int cnt)
public abstract void sysSyncCache(Address address, int size)
public abstract int sysPerfEventInit(int events)
public abstract int sysPerfEventCreate(int id, byte[] name)
public abstract void sysPerfEventEnable()
public abstract void sysPerfEventDisable()
public abstract int sysPerfEventRead(int id, long[] values)
public abstract int sysReadByte(int fd)
public abstract int sysWriteByte(int fd, int data)
public abstract int sysReadBytes(int fd, Address buf, int cnt)
public abstract int sysWriteBytes(int fd, Address buf, int cnt)
public abstract Address sysMMap(Address start, Extent length, int protection, int flags, int fd, Offset offset)
public abstract Address sysMMapErrno(Address start, Extent length, int protection, int flags, int fd, Offset offset)
public abstract int sysMProtect(Address start, Extent length, int prot)
public abstract int sysNumProcessors()
public abstract Word sysThreadCreate(Address ip, Address fp, Address tr, Address jtoc)
ip
- the current instruction pointerfp
- the frame pointertr
- the address of the RVMThread object for the threadjtoc
- value for the thread jtocpublic abstract int sysThreadBindSupported()
public abstract void sysThreadBind(int cpuId)
public abstract void sysThreadYield()
public abstract Word sysGetThreadId()
public abstract Word sysGetThreadPriorityHandle()
public abstract int sysGetThreadPriority(Word thread, Word handle)
public abstract int sysSetThreadPriority(Word thread, Word handle, int priority)
public abstract int sysStashVMThread(RVMThread vmThread)
public abstract void sysThreadTerminate()
public abstract Word sysMonitorCreate()
public abstract void sysMonitorDestroy(Word monitor)
monitor
- the pointer to the monitor that is supposed to be
destroyedpublic abstract void sysMonitorEnter(Word monitor)
public abstract void sysMonitorExit(Word monitor)
public abstract void sysMonitorTimedWaitAbsolute(Word monitor, long whenWakeupNanos)
public abstract void sysMonitorWait(Word monitor)
public abstract void sysMonitorBroadcast(Word monitor)
public abstract long sysLongDivide(long x, long y)
public abstract long sysLongRemainder(long x, long y)
public abstract float sysLongToFloat(long x)
public abstract double sysLongToDouble(long x)
public abstract int sysFloatToInt(float x)
public abstract int sysDoubleToInt(double x)
public abstract long sysFloatToLong(float x)
public abstract long sysDoubleToLong(double x)
public abstract double sysDoubleRemainder(double x, double y)
public abstract float sysPrimitiveParseFloat(byte[] buf)
buf
- a null terminated byte[] that can be parsed
by strtof()public abstract int sysPrimitiveParseInt(byte[] buf)
buf
- a null terminated byte[] that can be parsed
by strtol()public abstract long sysParseMemorySize(byte[] sizeName, byte[] sizeFlag, byte[] defaultFactor, int roundTo, byte[] argToken, byte[] subArg)
Note: all byte array parameters for this method represent Strings.
sizeName
- the option's namesizeFlag
- the flag's name, e.g. mx (as in "-Xmx")defaultFactor
- factor for modifying sizes, e.g. "K", "M" or "pages"roundTo
- round up to a multiple of this numberargToken
- the full command line argument, e.g. "-Xmx200M"subArg
- the value for the argument, e.g. "200M"public abstract long sysCurrentTimeMillis()
public abstract long sysNanoTime()
public abstract void sysNanoSleep(long howLongNanos)
public abstract boolean sysVaArgJboolean(Address va_list)
public abstract byte sysVaArgJbyte(Address va_list)
public abstract char sysVaArgJchar(Address va_list)
public abstract short sysVaArgJshort(Address va_list)
public abstract int sysVaArgJint(Address va_list)
public abstract long sysVaArgJlong(Address va_list)
public abstract float sysVaArgJfloat(Address va_list)
public abstract double sysVaArgJdouble(Address va_list)
public abstract int sysVaArgJobject(Address va_list)
public abstract void sysEnableAlignmentChecking()
public abstract void sysDisableAlignmentChecking()
public abstract void sysReportAlignmentChecking()
public abstract Address gcspyDriverAddStream(Address driver, int id)
public abstract void gcspyDriverEndOutput(Address driver)
public abstract void gcspyDriverInit(Address driver, int id, Address serverName, Address driverName, Address title, Address blockInfo, int tileNum, Address unused, int mainSpace)
public abstract void gcspyDriverInitOutput(Address driver)
public abstract void gcspyDriverResize(Address driver, int size)
public abstract void gcspyDriverSetTileNameRange(Address driver, int i, Address start, Address end)
public abstract void gcspyDriverSetTileName(Address driver, int i, Address start, long value)
public abstract void gcspyDriverSpaceInfo(Address driver, Address info)
public abstract void gcspyDriverStartComm(Address driver)
public abstract void gcspyDriverStream(Address driver, int id, int len)
public abstract void gcspyDriverStreamByteValue(Address driver, byte value)
public abstract void gcspyDriverStreamShortValue(Address driver, short value)
public abstract void gcspyDriverStreamIntValue(Address driver, int value)
public abstract void gcspyDriverSummary(Address driver, int id, int len)
public abstract void gcspyDriverSummaryValue(Address driver, int value)
public abstract void gcspyIntWriteControl(Address driver, int id, int tileNum)
public abstract Address gcspyMainServerAddDriver(Address addr)
public abstract void gcspyMainServerAddEvent(Address server, int event, Address name)
public abstract Address gcspyMainServerInit(int port, int len, Address name, int verbose)
public abstract int gcspyMainServerIsConnected(Address server, int event)
public abstract Address gcspyMainServerOuterLoop()
public abstract void gcspyMainServerSafepoint(Address server, int event)
public abstract void gcspyMainServerSetGeneralInfo(Address server, Address info)
public abstract void gcspyMainServerStartCompensationTimer(Address server)
public abstract void gcspyMainServerStopCompensationTimer(Address server)
public abstract void gcspyStartserver(Address server, int wait, Address serverOuterLoop)
public abstract void gcspyStreamInit(Address stream, int id, int dataType, Address name, int minValue, int maxValue, int zeroValue, int defaultValue, Address pre, Address post, int presentation, int paintStyle, int maxStreamIndex, int red, int green, int blue)
public abstract void gcspyFormatSize(Address buffer, int size)
public abstract int gcspySprintf(Address str, Address format, Address value)