joeq.Runtime
Class SystemInterface
java.lang.Object
joeq.Runtime.SystemInterface
public abstract class SystemInterface
- extends Object
- Version:
- $Id: SystemInterface.java,v 1.37 2004/09/30 03:35:35 joewhaley Exp $
- Author:
- John Whaley
Method Summary |
static StackAddress |
allocate_stack(int size)
|
static void |
close_library(int library)
|
static int |
console_available()
|
static int |
create_thread(CodeAddress start_address,
HeapAddress param)
|
static long |
currentTimeMillis()
|
static void |
debugwrite(byte[] msg)
|
static void |
debugwrite(byte[] msg,
int count)
|
static void |
debugwrite(String msg)
|
static void |
debugwrite(Utf8 msg)
|
static void |
debugwriteln(byte[] msg)
|
static void |
debugwriteln(byte[] msg,
int count)
|
static void |
debugwriteln(String msg)
|
static void |
die(int code)
|
static int |
file_close(int fd)
|
static int |
file_open(String fn,
int mode,
int smode)
|
static int |
file_readbytes(int fd,
Address startAddress,
int length)
|
static long |
file_seek(int fd,
long offset,
int origin)
|
static int |
file_stat(String fn,
SystemInterface.Stat s)
|
static int |
file_sync(int fd)
|
static int |
file_writebyte(int fd,
int b)
|
static int |
file_writebytes(int fd,
Address startAddress,
int length)
|
static String |
fromCString(Address p)
|
static int |
fs_access(String s,
int mode)
|
static int |
fs_chmod(String s,
int mode)
|
static int |
fs_closedir(int p)
|
static int |
fs_fullpath(String s,
byte[] b)
|
static int |
fs_getdcwd(int i,
byte[] b)
|
static int |
fs_getfileattributes(String s)
|
static long |
fs_getfiletime(String s)
|
static int |
fs_getlogicaldrives()
|
static Address |
fs_gettruename(String s)
|
static int |
fs_mkdir(String s)
|
static int |
fs_opendir(String s)
|
static Address |
fs_readdir(int p)
|
static int |
fs_remove(String s)
|
static int |
fs_rename(String s,
String s1)
|
static int |
fs_setfiletime(String s,
long time)
|
static long |
fs_stat_size(String s)
|
static int |
get_current_thread_handle()
|
static CodeAddress |
get_proc_address(int library,
byte[] name)
|
static boolean |
get_thread_context(int pid,
jq_RegisterState context)
|
static int |
init_semaphore()
|
static int |
init_thread()
|
static int |
main_argc()
|
static int |
main_argv_length(int i)
|
static void |
main_argv(int i,
byte[] b)
|
static void |
mem_cpy(Address to,
Address from,
int size)
|
static void |
mem_set(Address to,
byte b,
int size)
|
static void |
msleep(int ms)
|
static int |
open_library(byte[] library_name)
|
static SystemInterface.Library |
registerLibrary(String libraryName)
|
static int |
release_semaphore(int semaphore,
int v1)
|
static int |
resume_thread(int thread_handle)
|
static void |
set_current_context(jq_Thread thread,
jq_RegisterState context)
|
static void |
set_interval_timer(int type,
int ms)
|
static boolean |
set_thread_context(int pid,
jq_RegisterState context)
|
static int |
set_thread_priority(int thread_handle,
int level)
|
static int |
suspend_thread(int thread_handle)
|
static Address |
syscalloc(int size)
|
static void |
sysfree(Address a)
|
static byte[] |
toCString(String s)
|
static SystemInterface.ExternalLink |
tryLink(String name)
|
static int |
wait_for_single_object(int obj,
int timeout)
|
static void |
yield()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
open_library_4
public static CodeAddress open_library_4
get_proc_address_8
public static CodeAddress get_proc_address_8
close_library_4
public static CodeAddress close_library_4
libraries
public static final Collection libraries
debugwrite_8
public static CodeAddress debugwrite_8
debugwwrite_8
public static CodeAddress debugwwrite_8
debugwriteln_8
public static CodeAddress debugwriteln_8
debugwwriteln_8
public static CodeAddress debugwwriteln_8
syscalloc_4
public static CodeAddress syscalloc_4
sysfree_4
public static CodeAddress sysfree_4
die_4
public static CodeAddress die_4
currentTimeMillis_0
public static CodeAddress currentTimeMillis_0
mem_cpy_12
public static CodeAddress mem_cpy_12
mem_set_12
public static CodeAddress mem_set_12
file_open_12
public static CodeAddress file_open_12
file_stat_8
public static CodeAddress file_stat_8
file_readbytes_12
public static CodeAddress file_readbytes_12
file_writebyte_8
public static CodeAddress file_writebyte_8
file_writebytes_12
public static CodeAddress file_writebytes_12
file_sync_4
public static CodeAddress file_sync_4
file_seek_16
public static CodeAddress file_seek_16
file_close_4
public static CodeAddress file_close_4
console_available_0
public static CodeAddress console_available_0
main_argc_0
public static CodeAddress main_argc_0
main_argv_length_4
public static CodeAddress main_argv_length_4
main_argv_8
public static CodeAddress main_argv_8
fs_getdcwd_12
public static CodeAddress fs_getdcwd_12
fs_fullpath_12
public static CodeAddress fs_fullpath_12
fs_gettruename_4
public static CodeAddress fs_gettruename_4
fs_getfileattributes_4
public static CodeAddress fs_getfileattributes_4
fs_access_8
public static CodeAddress fs_access_8
fs_getfiletime_4
public static CodeAddress fs_getfiletime_4
fs_stat_size_4
public static CodeAddress fs_stat_size_4
fs_remove_4
public static CodeAddress fs_remove_4
fs_opendir_4
public static CodeAddress fs_opendir_4
fs_readdir_4
public static CodeAddress fs_readdir_4
fs_closedir_4
public static CodeAddress fs_closedir_4
fs_mkdir_4
public static CodeAddress fs_mkdir_4
fs_rename_8
public static CodeAddress fs_rename_8
fs_chmod_8
public static CodeAddress fs_chmod_8
fs_setfiletime_12
public static CodeAddress fs_setfiletime_12
fs_getlogicaldrives_0
public static CodeAddress fs_getlogicaldrives_0
yield_0
public static CodeAddress yield_0
msleep_4
public static CodeAddress msleep_4
create_thread_8
public static CodeAddress create_thread_8
init_thread_0
public static CodeAddress init_thread_0
resume_thread_4
public static CodeAddress resume_thread_4
suspend_thread_4
public static CodeAddress suspend_thread_4
set_thread_priority_8
public static CodeAddress set_thread_priority_8
allocate_stack_4
public static CodeAddress allocate_stack_4
get_current_thread_handle_0
public static CodeAddress get_current_thread_handle_0
get_thread_context_8
public static CodeAddress get_thread_context_8
set_thread_context_8
public static CodeAddress set_thread_context_8
set_current_context_8
public static CodeAddress set_current_context_8
set_interval_timer_8
public static CodeAddress set_interval_timer_8
init_semaphore_0
public static CodeAddress init_semaphore_0
wait_for_single_object_8
public static CodeAddress wait_for_single_object_8
release_semaphore_8
public static CodeAddress release_semaphore_8
_class
public static final jq_Class _class
_debugwrite
public static final jq_StaticField _debugwrite
_debugwriteln
public static final jq_StaticField _debugwriteln
_string_value
public static final jq_InstanceField _string_value
_string_offset
public static final jq_InstanceField _string_offset
_string_count
public static final jq_InstanceField _string_count
DEFAULT_ENCODING
public static final String DEFAULT_ENCODING
- See Also:
- Constant Field Values
_O_RDONLY
public static final int _O_RDONLY
- See Also:
- Constant Field Values
_O_WRONLY
public static final int _O_WRONLY
- See Also:
- Constant Field Values
_O_RDWR
public static final int _O_RDWR
- See Also:
- Constant Field Values
_O_APPEND
public static final int _O_APPEND
- See Also:
- Constant Field Values
_O_CREAT
public static final int _O_CREAT
- See Also:
- Constant Field Values
_O_TRUNC
public static final int _O_TRUNC
- See Also:
- Constant Field Values
_O_EXCL
public static final int _O_EXCL
- See Also:
- Constant Field Values
_O_TEXT
public static final int _O_TEXT
- See Also:
- Constant Field Values
_O_BINARY
public static final int _O_BINARY
- See Also:
- Constant Field Values
SEEK_SET
public static final int SEEK_SET
- See Also:
- Constant Field Values
SEEK_CUR
public static final int SEEK_CUR
- See Also:
- Constant Field Values
SEEK_END
public static final int SEEK_END
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_READONLY
public static final int FILE_ATTRIBUTE_READONLY
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_HIDDEN
public static final int FILE_ATTRIBUTE_HIDDEN
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_SYSTEM
public static final int FILE_ATTRIBUTE_SYSTEM
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_DIRECTORY
public static final int FILE_ATTRIBUTE_DIRECTORY
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_ARCHIVE
public static final int FILE_ATTRIBUTE_ARCHIVE
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_NORMAL
public static final int FILE_ATTRIBUTE_NORMAL
- See Also:
- Constant Field Values
FILE_ATTRIBUTE_TEMPORARY
public static final int FILE_ATTRIBUTE_TEMPORARY
- See Also:
- Constant Field Values
readdir_name_offset
public static final int readdir_name_offset
- See Also:
- Constant Field Values
_S_IEXEC
public static final int _S_IEXEC
- See Also:
- Constant Field Values
_S_IWRITE
public static final int _S_IWRITE
- See Also:
- Constant Field Values
_S_IREAD
public static final int _S_IREAD
- See Also:
- Constant Field Values
THREAD_BASE_PRIORITY_LOWRT
public static final int THREAD_BASE_PRIORITY_LOWRT
- See Also:
- Constant Field Values
THREAD_BASE_PRIORITY_MAX
public static final int THREAD_BASE_PRIORITY_MAX
- See Also:
- Constant Field Values
THREAD_BASE_PRIORITY_MIN
public static final int THREAD_BASE_PRIORITY_MIN
- See Also:
- Constant Field Values
THREAD_BASE_PRIORITY_IDLE
public static final int THREAD_BASE_PRIORITY_IDLE
- See Also:
- Constant Field Values
THREAD_PRIORITY_LOWEST
public static final int THREAD_PRIORITY_LOWEST
- See Also:
- Constant Field Values
THREAD_PRIORITY_BELOW_NORMAL
public static final int THREAD_PRIORITY_BELOW_NORMAL
- See Also:
- Constant Field Values
THREAD_PRIORITY_NORMAL
public static final int THREAD_PRIORITY_NORMAL
- See Also:
- Constant Field Values
THREAD_PRIORITY_HIGHEST
public static final int THREAD_PRIORITY_HIGHEST
- See Also:
- Constant Field Values
THREAD_PRIORITY_ABOVE_NORMAL
public static final int THREAD_PRIORITY_ABOVE_NORMAL
- See Also:
- Constant Field Values
THREAD_PRIORITY_TIME_CRITICAL
public static final int THREAD_PRIORITY_TIME_CRITICAL
- See Also:
- Constant Field Values
THREAD_PRIORITY_IDLE
public static final int THREAD_PRIORITY_IDLE
- See Also:
- Constant Field Values
ITIMER_VIRTUAL
public static final int ITIMER_VIRTUAL
- See Also:
- Constant Field Values
INFINITE
public static final int INFINITE
- See Also:
- Constant Field Values
WAIT_ABANDONED
public static final int WAIT_ABANDONED
- See Also:
- Constant Field Values
WAIT_OBJECT_0
public static final int WAIT_OBJECT_0
- See Also:
- Constant Field Values
WAIT_TIMEOUT
public static final int WAIT_TIMEOUT
- See Also:
- Constant Field Values
SystemInterface
public SystemInterface()
open_library
public static int open_library(byte[] library_name)
close_library
public static void close_library(int library)
get_proc_address
public static CodeAddress get_proc_address(int library,
byte[] name)
registerLibrary
public static SystemInterface.Library registerLibrary(String libraryName)
tryLink
public static SystemInterface.ExternalLink tryLink(String name)
debugwrite
public static void debugwrite(String msg)
debugwrite
public static void debugwrite(Utf8 msg)
debugwrite
public static void debugwrite(byte[] msg)
debugwrite
public static void debugwrite(byte[] msg,
int count)
debugwriteln
public static void debugwriteln(String msg)
debugwriteln
public static void debugwriteln(byte[] msg)
debugwriteln
public static void debugwriteln(byte[] msg,
int count)
syscalloc
public static Address syscalloc(int size)
sysfree
public static void sysfree(Address a)
die
public static void die(int code)
toCString
public static byte[] toCString(String s)
fromCString
public static String fromCString(Address p)
currentTimeMillis
public static long currentTimeMillis()
mem_cpy
public static void mem_cpy(Address to,
Address from,
int size)
mem_set
public static void mem_set(Address to,
byte b,
int size)
file_open
public static int file_open(String fn,
int mode,
int smode)
file_stat
public static int file_stat(String fn,
SystemInterface.Stat s)
file_readbytes
public static int file_readbytes(int fd,
Address startAddress,
int length)
file_writebyte
public static int file_writebyte(int fd,
int b)
file_writebytes
public static int file_writebytes(int fd,
Address startAddress,
int length)
file_sync
public static int file_sync(int fd)
file_seek
public static long file_seek(int fd,
long offset,
int origin)
file_close
public static int file_close(int fd)
console_available
public static int console_available()
main_argc
public static int main_argc()
main_argv_length
public static int main_argv_length(int i)
main_argv
public static void main_argv(int i,
byte[] b)
fs_getdcwd
public static int fs_getdcwd(int i,
byte[] b)
fs_fullpath
public static int fs_fullpath(String s,
byte[] b)
fs_gettruename
public static Address fs_gettruename(String s)
fs_getfileattributes
public static int fs_getfileattributes(String s)
fs_access
public static int fs_access(String s,
int mode)
fs_getfiletime
public static long fs_getfiletime(String s)
fs_stat_size
public static long fs_stat_size(String s)
fs_remove
public static int fs_remove(String s)
fs_opendir
public static int fs_opendir(String s)
fs_readdir
public static Address fs_readdir(int p)
fs_closedir
public static int fs_closedir(int p)
fs_mkdir
public static int fs_mkdir(String s)
fs_rename
public static int fs_rename(String s,
String s1)
fs_chmod
public static int fs_chmod(String s,
int mode)
fs_setfiletime
public static int fs_setfiletime(String s,
long time)
fs_getlogicaldrives
public static int fs_getlogicaldrives()
yield
public static void yield()
msleep
public static void msleep(int ms)
create_thread
public static int create_thread(CodeAddress start_address,
HeapAddress param)
init_thread
public static int init_thread()
resume_thread
public static int resume_thread(int thread_handle)
suspend_thread
public static int suspend_thread(int thread_handle)
set_thread_priority
public static int set_thread_priority(int thread_handle,
int level)
allocate_stack
public static StackAddress allocate_stack(int size)
get_current_thread_handle
public static int get_current_thread_handle()
get_thread_context
public static boolean get_thread_context(int pid,
jq_RegisterState context)
set_thread_context
public static boolean set_thread_context(int pid,
jq_RegisterState context)
set_current_context
public static void set_current_context(jq_Thread thread,
jq_RegisterState context)
set_interval_timer
public static void set_interval_timer(int type,
int ms)
init_semaphore
public static int init_semaphore()
wait_for_single_object
public static int wait_for_single_object(int obj,
int timeout)
release_semaphore
public static int release_semaphore(int semaphore,
int v1)
Copyright © 2001-2005 John Whaley. All Rights Reserved.