finally got the macro done, now merging
This commit is contained in:
commit
796f9ae128
|
@ -34,6 +34,12 @@ impl Externals for HostFunctions {
|
||||||
|
|
||||||
Ok(Some(RuntimeValue::I32(result as i32)))
|
Ok(Some(RuntimeValue::I32(result as i32)))
|
||||||
}
|
}
|
||||||
|
SysCall::CONSOLE_RESET => {}
|
||||||
|
SysCall::CONSOLE_IN => {}
|
||||||
|
SysCall::CONSOLE_OUT => {}
|
||||||
|
SysCall::CONSOLE_GET_TITLE => {}
|
||||||
|
SysCall::CONSOLE_SET_TITLE => {}
|
||||||
|
|
||||||
_ => panic!("Unimplemented function at {}", index),
|
_ => panic!("Unimplemented function at {}", index),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,8 @@ syscall_enum! {
|
||||||
CONSOLE_OUT = 3, // Console output
|
CONSOLE_OUT = 3, // Console output
|
||||||
CONSOLE_GET_TITLE = 4, // Get the console title
|
CONSOLE_GET_TITLE = 4, // Get the console title
|
||||||
CONSOLE_SET_TITLE = 5, // Set the console title
|
CONSOLE_SET_TITLE = 5, // Set the console title
|
||||||
|
GET_PID = 6; // Get the proccess ID
|
||||||
|
PROCESS_INFO = 7; // Get information about the process
|
||||||
//scheduler Related Syscals
|
//scheduler Related Syscals
|
||||||
GET_PRIORITY = 10, // Get scheduler priority
|
GET_PRIORITY = 10, // Get scheduler priority
|
||||||
SET_PRIORITY = 11, // Set scheduler priority
|
SET_PRIORITY = 11, // Set scheduler priority
|
||||||
|
@ -57,6 +58,24 @@ syscall_enum! {
|
||||||
FILE_READ = 30,
|
FILE_READ = 30,
|
||||||
FILE_WRITE = 31,
|
FILE_WRITE = 31,
|
||||||
|
|
||||||
|
SLEEP=32, // Sleep in milliseconds
|
||||||
|
SLEEP_UNTIL=33, // Sleep until this time in milliseconds (if this is below the current time return)
|
||||||
|
NANOSLEEP=34, // Sleep in nanoseconds
|
||||||
|
NANOSLEEP_UNTIL=35, // Sleep until this time nanoseconds (if this is below the current time return)
|
||||||
|
GET_TIME = 36, // Gets the system time (some derivitive of seconds)
|
||||||
|
SET_TIME = 37, // Sets the system time (some derivitive of seconds)
|
||||||
|
|
||||||
|
|
||||||
|
// Socket SysCall
|
||||||
|
SOCKET_BIND=39, // Used by servers to lock a port
|
||||||
|
SOCKET_CONNECT=40,
|
||||||
|
SOCKET_DISCONNECT=41,
|
||||||
|
SOCKET_SEND=42,
|
||||||
|
SOCKET_RECIEVE=43,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Security Syscalls
|
// Security Syscalls
|
||||||
ENCRYPT = 50,
|
ENCRYPT = 50,
|
||||||
EMPTY = 0xFFFF,
|
EMPTY = 0xFFFF,
|
||||||
|
|
Reference in a new issue