2024-08-05 16:47:24 +00:00
|
|
|
read(fd Int, address Pointer, length Int) -> Int {
|
2024-07-18 16:08:30 +00:00
|
|
|
return syscall(0, fd, address, length)
|
|
|
|
}
|
|
|
|
|
2024-08-05 16:47:24 +00:00
|
|
|
write(fd Int, address Pointer, length Int) -> Int {
|
2024-07-18 19:10:27 +00:00
|
|
|
return syscall(1, fd, address, length)
|
2024-07-18 16:08:30 +00:00
|
|
|
}
|
|
|
|
|
2024-08-05 16:47:24 +00:00
|
|
|
open(file Pointer, flags Int, mode Int) -> Int {
|
2024-07-18 16:08:30 +00:00
|
|
|
return syscall(2, file, flags, mode)
|
|
|
|
}
|
|
|
|
|
2024-08-05 16:47:24 +00:00
|
|
|
close(fd Int) -> Int {
|
2024-07-18 16:08:30 +00:00
|
|
|
return syscall(3, fd)
|
|
|
|
}
|
|
|
|
|
2024-08-05 16:47:24 +00:00
|
|
|
mmap(address Int, length Int, protection Int, flags Int) -> Int {
|
2024-07-18 16:08:30 +00:00
|
|
|
return syscall(9, address, length, protection, flags)
|
|
|
|
}
|
|
|
|
|
2024-08-05 16:47:24 +00:00
|
|
|
munmap(address Pointer, length Int) -> Int {
|
2024-07-18 16:08:30 +00:00
|
|
|
return syscall(11, address, length)
|
|
|
|
}
|
|
|
|
|
2024-08-05 16:47:24 +00:00
|
|
|
clone(flags Int, stack Pointer) -> ThreadID {
|
2024-07-18 16:08:30 +00:00
|
|
|
return syscall(56, flags, stack)
|
|
|
|
}
|
|
|
|
|
2024-08-05 16:47:24 +00:00
|
|
|
exit(status Int) {
|
|
|
|
syscall(60, status)
|
2024-07-18 16:08:30 +00:00
|
|
|
}
|
|
|
|
|
2024-08-05 16:47:24 +00:00
|
|
|
socket(family Int, type Int, protocol Int) -> Int {
|
2024-07-21 19:30:37 +00:00
|
|
|
return syscall(41, family, type, protocol)
|
|
|
|
}
|
|
|
|
|
2024-08-05 16:47:24 +00:00
|
|
|
accept(fd Int, address Pointer, length Int) -> Int {
|
2024-07-21 19:30:37 +00:00
|
|
|
return syscall(43, fd, address, length)
|
|
|
|
}
|
|
|
|
|
2024-08-05 16:47:24 +00:00
|
|
|
bind(fd Int, address Pointer, length Int) -> Int {
|
2024-07-21 19:30:37 +00:00
|
|
|
return syscall(49, fd, address, length)
|
|
|
|
}
|
|
|
|
|
2024-08-05 16:47:24 +00:00
|
|
|
listen(fd Int, backlog Int) -> Int {
|
2024-07-21 19:30:37 +00:00
|
|
|
return syscall(50, fd, backlog)
|
|
|
|
}
|
|
|
|
|
2024-08-05 16:47:24 +00:00
|
|
|
getcwd(buffer Pointer, length Int) -> Int {
|
2024-07-18 16:08:30 +00:00
|
|
|
return syscall(79, buffer, length)
|
|
|
|
}
|
|
|
|
|
2024-08-05 16:47:24 +00:00
|
|
|
chdir(path Pointer) -> Int {
|
2024-07-18 16:08:30 +00:00
|
|
|
return syscall(80, path)
|
|
|
|
}
|
|
|
|
|
2024-08-05 16:47:24 +00:00
|
|
|
rename(old Pointer, new Pointer) -> Int {
|
2024-07-18 16:08:30 +00:00
|
|
|
return syscall(82, old, new)
|
|
|
|
}
|
|
|
|
|
2024-08-05 16:47:24 +00:00
|
|
|
mkdir(path Pointer, mode Int) -> Int {
|
2024-07-18 16:08:30 +00:00
|
|
|
return syscall(83, path, mode)
|
|
|
|
}
|
|
|
|
|
2024-08-05 16:47:24 +00:00
|
|
|
rmdir(path Pointer) -> Int {
|
2024-07-18 16:08:30 +00:00
|
|
|
return syscall(84, path)
|
|
|
|
}
|
|
|
|
|
2024-08-05 16:47:24 +00:00
|
|
|
unlink(file Pointer) -> Int {
|
2024-07-18 16:08:30 +00:00
|
|
|
return syscall(87, file)
|
|
|
|
}
|