Implemented package imports
This commit is contained in:
55
lib/sys/linux.q
Normal file
55
lib/sys/linux.q
Normal file
@ -0,0 +1,55 @@
|
||||
read(fd, address, length) {
|
||||
return syscall(0, fd, address, length)
|
||||
}
|
||||
|
||||
write(fd, address, length) {
|
||||
syscall(1, fd, address, length)
|
||||
}
|
||||
|
||||
open(file, flags, mode) {
|
||||
return syscall(2, file, flags, mode)
|
||||
}
|
||||
|
||||
close(fd) {
|
||||
return syscall(3, fd)
|
||||
}
|
||||
|
||||
mmap(address, length, protection, flags) {
|
||||
return syscall(9, address, length, protection, flags)
|
||||
}
|
||||
|
||||
munmap(address, length) {
|
||||
return syscall(11, address, length)
|
||||
}
|
||||
|
||||
clone(flags, stack) {
|
||||
return syscall(56, flags, stack)
|
||||
}
|
||||
|
||||
exit(code) {
|
||||
syscall(60, code)
|
||||
}
|
||||
|
||||
getcwd(buffer, length) {
|
||||
return syscall(79, buffer, length)
|
||||
}
|
||||
|
||||
chdir(path) {
|
||||
return syscall(80, path)
|
||||
}
|
||||
|
||||
rename(old, new) {
|
||||
return syscall(82, old, new)
|
||||
}
|
||||
|
||||
mkdir(path, mode) {
|
||||
return syscall(83, path, mode)
|
||||
}
|
||||
|
||||
rmdir(path) {
|
||||
return syscall(84, path)
|
||||
}
|
||||
|
||||
unlink(file) {
|
||||
return syscall(87, file)
|
||||
}
|
Reference in New Issue
Block a user