Added conditional compilation for each OS
This commit is contained in:
27
lib/sys/sys_mac.q
Normal file
27
lib/sys/sys_mac.q
Normal file
@ -0,0 +1,27 @@
|
||||
read(fd Int, address Pointer, length Int) -> Int {
|
||||
return syscall(0x2000003, fd, address, length)
|
||||
}
|
||||
|
||||
write(fd Int, address Pointer, length Int) -> Int {
|
||||
return syscall(0x2000004, fd, address, length)
|
||||
}
|
||||
|
||||
open(file Pointer, flags Int, mode Int) -> Int {
|
||||
return syscall(0x2000005, file, flags, mode)
|
||||
}
|
||||
|
||||
close(fd Int) -> Int {
|
||||
return syscall(0x2000006, fd)
|
||||
}
|
||||
|
||||
mmap(address Int, length Int, protection Int, flags Int) -> Pointer {
|
||||
return syscall(0x20000C5, address, length, protection, flags)
|
||||
}
|
||||
|
||||
munmap(address Pointer, length Int) -> Int {
|
||||
return syscall(0x2000049, address, length)
|
||||
}
|
||||
|
||||
exit(status Int) {
|
||||
syscall(0x2000001, status)
|
||||
}
|
Reference in New Issue
Block a user