72 lines
1.4 KiB
Plaintext
72 lines
1.4 KiB
Plaintext
read(fd Int, address Pointer, length Int) -> Int {
|
|
return syscall(0, fd, address, length)
|
|
}
|
|
|
|
write(fd Int, address Pointer, length Int) -> Int {
|
|
return syscall(1, fd, address, length)
|
|
}
|
|
|
|
open(file Pointer, flags Int, mode Int) -> Int {
|
|
return syscall(2, file, flags, mode)
|
|
}
|
|
|
|
close(fd Int) -> Int {
|
|
return syscall(3, fd)
|
|
}
|
|
|
|
mmap(address Int, length Int, protection Int, flags Int) -> Pointer {
|
|
return syscall(9, address, length, protection, flags)
|
|
}
|
|
|
|
munmap(address Pointer, length Int) -> Int {
|
|
return syscall(11, address, length)
|
|
}
|
|
|
|
clone(flags Int, stack Pointer) -> ThreadID {
|
|
return syscall(56, flags, stack)
|
|
}
|
|
|
|
exit(status Int) {
|
|
syscall(60, status)
|
|
}
|
|
|
|
socket(family Int, type Int, protocol Int) -> Int {
|
|
return syscall(41, family, type, protocol)
|
|
}
|
|
|
|
accept(fd Int, address Pointer, length Int) -> Int {
|
|
return syscall(43, fd, address, length)
|
|
}
|
|
|
|
bind(fd Int, address Pointer, length Int) -> Int {
|
|
return syscall(49, fd, address, length)
|
|
}
|
|
|
|
listen(fd Int, backlog Int) -> Int {
|
|
return syscall(50, fd, backlog)
|
|
}
|
|
|
|
getcwd(buffer Pointer, length Int) -> Int {
|
|
return syscall(79, buffer, length)
|
|
}
|
|
|
|
chdir(path Pointer) -> Int {
|
|
return syscall(80, path)
|
|
}
|
|
|
|
rename(old Pointer, new Pointer) -> Int {
|
|
return syscall(82, old, new)
|
|
}
|
|
|
|
mkdir(path Pointer, mode Int) -> Int {
|
|
return syscall(83, path, mode)
|
|
}
|
|
|
|
rmdir(path Pointer) -> Int {
|
|
return syscall(84, path)
|
|
}
|
|
|
|
unlink(file Pointer) -> Int {
|
|
return syscall(87, file)
|
|
}
|