#ifndef CURRENT_H
#define CURRENT_H
#include <current.h>
struct proc_struct;
struct proc_group_struct;
struct registers_struct;
struct interrupted_instruction_struct;
struct file_descr_struct;
int is_idle();
void change_set_proc_group(struct proc_group_struct *proc_group);
int change_create_proc_group();
int change_wd(const char *fs_path);
int alloc_fd(int start, struct file_descr_struct *file_descr, int *fd);
void free_fd(int fd);
struct file_descr_struct *get_file_descr(int fd);
int exec(const char *fs_filename, char *const fs_argv[], char *const fs_envp[], struct registers_struct *registers, struct interrupted_instruction_struct *interrupted_instruction, int *status);
int sbrk(int increment, unsigned long *brk);
int fork(const struct registers_struct *registers, const struct interrupted_instruction_struct *interrupted_instruction);
int is_child(const struct proc_struct *proc);
int change_set_child_proc_group(struct proc_struct *child, struct proc_group_struct *proc_group);
int change_create_child_proc_group(struct proc_struct *child);
int wait(struct proc_struct *child, int *status, int options);
int wait_group_any(struct proc_group_struct *proc_group, int *status, int options);
int wait_any(int *status, int options);
int is_orphaned_proc_group(const struct proc_group_struct *proc_group);
void reap_orphan_zombies();
void exit(int code) __attribute__ ((noreturn));
void abort(int sig) __attribute__ ((noreturn));
void *memory_map(void *addr, unsigned int len, int prot, int fd, long off);
int memory_unmap(void *addr, unsigned int len);
int memory_protect(void *addr, unsigned int len, int prot);
int handle_page_fault(int cause, int access, unsigned long stack_top, unsigned long laddr);
void yield();
#endif