A toy operating system written in C.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
freywaros/src/user/syscall.h

25 lines
531 B

#pragma once
#include "src/lib/util.h"
uint64_t read(int64_t fd, uint64_t max, void *to);
uint64_t write(int64_t fd, const void *from, uint64_t bytes);
uint64_t getcwd(uint64_t max, void *to);
uint64_t chdir(const char *path);
uint64_t spawn(const char *path, uint64_t argc, const char **argv);
exit_code_t waitpid(uint64_t pid);
uint64_t open(const char *path, uint64_t flags);
uint64_t close(uint64_t fd);
uint64_t truncate(uint64_t fd, uint64_t size);
uint64_t remove(const char *path);
void exit(exit_code_t code);