Reorganized sys functions
This commit is contained in:
@ -1,71 +0,0 @@
|
||||
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)
|
||||
}
|
||||
|
||||
nanosleep(duration Pointer) -> Int {
|
||||
return syscall(35, duration, 0)
|
||||
}
|
||||
|
||||
clone(flags Int, stack Pointer) -> Int {
|
||||
return syscall(56, flags, stack)
|
||||
}
|
||||
|
||||
fork() -> Int {
|
||||
return syscall(57)
|
||||
}
|
||||
|
||||
execve(path Pointer, argv Pointer, envp Pointer) -> Int {
|
||||
return syscall(59, path, argv, envp)
|
||||
}
|
||||
|
||||
exit(status Int) {
|
||||
syscall(60, status)
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
waitid(type Int, id Int, info Pointer, options Int) -> Int {
|
||||
return syscall(247, type, id, info, options)
|
||||
}
|
Reference in New Issue
Block a user