4 #include <core/types.h>
7 /* arch/ARCH/sys/proc.c */
8 void arch_proc_init(struct proc
*proc
);
9 void arch_proc_kill(struct proc
*proc
);
10 void arch_init_execve(struct proc
*proc
, int argc
, char * const _argp
[], int envc
, char * const _envp
[]);
11 void arch_sleep(void);
13 /* arch/ARCH/sys/thread.c */
14 void arch_thread_create(struct thread
*thread
, uintptr_t stack
, uintptr_t entry
, uintptr_t uentry
, uintptr_t arg
);
15 void arch_thread_kill(struct thread
*thread
);
16 void arch_thread_spawn(struct thread
*thread
);
17 void arch_thread_switch(struct thread
*thread
); // __attribute__((noreturn));
20 /* arch/ARCH/sys/fork.c */
21 int arch_proc_fork(struct thread
*thread
, struct proc
*fork
);
23 /* arch/ARCH/sys/syscall.c */
24 void arch_syscall_return(struct thread
*thread
, uintptr_t val
);
26 /* arch/ARCH/sys/sched.c */
27 void arch_sched_init(void);
29 void arch_cur_thread_kill(void);// __attribute__((noreturn));
31 /* arch/ARCH/sys/execve.c */
32 void arch_sys_execve(struct proc
*proc
, int argc
, char * const argp
[], int envc
, char * const envp
[]);
34 /* arch/ARCH/sys/signal.c */
35 void arch_handle_signal(int sig
);
37 /* arch/ARCH/mm/mm.c */
38 void arch_mm_setup(void);
40 paddr_t
arch_page_get_mapping(struct pmap
*pmap
, vaddr_t vaddr
);
42 void arch_disable_interrupts(void);
44 void arch_reboot(void);
46 uint64_t arch_rtime_ns(void);
47 uint64_t arch_rtime_us(void);
48 uint64_t arch_rtime_ms(void);
50 int arch_time_get(struct timespec
*ts
);
52 void arch_stack_trace(void);
54 #endif /* ! _CORE_ARCH_H */