Standardize most system calls

This commit is contained in:
Enrico Fraccaroli
2019-05-10 17:18:34 +02:00
parent 9368b0d6eb
commit c0e5808656
22 changed files with 408 additions and 557 deletions
-12
View File
@@ -195,20 +195,8 @@ typedef struct task_struct {
} task_struct;
/// @brief Create a child process.
pid_t sys_vfork(pt_regs *r);
// TODO: doxygen comment.
char *get_current_dir_name();
// TODO: doxygen comment.
void sys_getcwd(char *path, size_t size);
// TODO: doxygen comment.s
void sys_chdir(char const *path);
/// @brief Replaces the current process image with a new process image.
int sys_execve(pt_regs *r);
/// @brief Create and spawn the init process.
struct task_struct *create_init_process();
-14
View File
@@ -62,21 +62,7 @@ void do_switch(task_struct *process, pt_regs *f);
/// @param process The process that has to be executed
void enter_user_jmp(uintptr_t location, uintptr_t stack);
/// Returns the process ID (PID) of the calling process.
pid_t sys_getpid();
/// Returns the parent process ID (PPID) of the calling process.
pid_t sys_getppid();
/// @brief Sets the priority value of the given task.
int set_user_nice(task_struct *p, long nice);
/// @brief Adds the increment to the priority value of the task.
int sys_nice(int increment);
/// @brief Suspends execution of the calling thread until a child specified
/// by pid argument has changed state.
pid_t sys_waitpid(pid_t pid, int *status, int options);
/// The exit() function causes normal process termination.
void sys_exit(int exit_code);