Run first app from ramdisk!
This commit is contained in:
49
kernel/proc/proc.h
Normal file
49
kernel/proc/proc.h
Normal file
@@ -0,0 +1,49 @@
|
||||
#ifndef _KERNEL_PROC_PROC_H
|
||||
#define _KERNEL_PROC_PROC_H
|
||||
|
||||
#include <aux/compiler.h>
|
||||
#include <libk/std.h>
|
||||
#include <sync/spin_lock.h>
|
||||
#include <sys/mm.h>
|
||||
|
||||
#if defined(__x86_64__)
|
||||
#include <amd64/gdt.h> /* KSTACK_SIZE */
|
||||
#include <amd64/proc.h> /* USTACK_SIZE */
|
||||
#endif
|
||||
|
||||
struct cpu;
|
||||
|
||||
struct proc_mapping {
|
||||
struct proc_mapping* next;
|
||||
uintptr_t paddr;
|
||||
uintptr_t vaddr;
|
||||
size_t size;
|
||||
} PACKED;
|
||||
|
||||
struct procw;
|
||||
|
||||
struct proc {
|
||||
struct proc* next;
|
||||
struct proc_mapping* mappings; /* pd.lock implicitly protects this field */
|
||||
struct proc_platformdata pdata;
|
||||
struct pd pd;
|
||||
spin_lock_t lock;
|
||||
struct cpu* cpu;
|
||||
struct procw* procw; /* link to it's global struct */
|
||||
};
|
||||
|
||||
/*
|
||||
* struct proc is a member of a CPU's proc_run_q.
|
||||
* struct procw is a process wrapper that is a member of
|
||||
* a global process list.
|
||||
*/
|
||||
struct procw {
|
||||
struct procw* next;
|
||||
struct proc* proc;
|
||||
};
|
||||
|
||||
void proc_sched (void);
|
||||
void proc_kill (struct proc* proc);
|
||||
void proc_init (void);
|
||||
|
||||
#endif // _KERNEL_PROC_PROC_H
|
||||
Reference in New Issue
Block a user