Implement proc_spawn_thread syscall, fix proc_resume and proc_suspend
All checks were successful
Build documentation / build-and-deploy (push) Successful in 35s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 35s
This commit is contained in:
@@ -25,6 +25,8 @@
|
||||
|
||||
#define PROC_RESOURCES_MAX 1024
|
||||
|
||||
#define PROC_USTK_PREALLOC (1 << 0)
|
||||
|
||||
struct cpu;
|
||||
|
||||
struct proc_mapping {
|
||||
@@ -35,6 +37,11 @@ struct proc_mapping {
|
||||
size_t size;
|
||||
};
|
||||
|
||||
struct proc_sys_rids {
|
||||
atomic_int refs;
|
||||
atomic_int counter;
|
||||
};
|
||||
|
||||
struct proc {
|
||||
int pid;
|
||||
struct rb_node_link proc_tree_link;
|
||||
@@ -44,11 +51,13 @@ struct proc {
|
||||
|
||||
struct list_node_link* mappings; /* pd.lock implicitly protects this field */
|
||||
struct proc_platformdata pdata;
|
||||
uint32_t flags;
|
||||
struct pd* pd;
|
||||
spin_lock_t lock;
|
||||
struct cpu* cpu;
|
||||
atomic_int state;
|
||||
struct rb_node_link* resource_tree;
|
||||
struct proc_sys_rids* sys_rids;
|
||||
struct proc_suspension_q* suspension_q;
|
||||
};
|
||||
|
||||
@@ -60,6 +69,7 @@ bool proc_map (struct proc* proc, uintptr_t start_paddr, uintptr_t start_vaddr,
|
||||
uint32_t flags);
|
||||
bool proc_unmap (struct proc* proc, uintptr_t start_vaddr, size_t pages);
|
||||
struct elf_aux proc_load_segments (struct proc* proc, uint8_t* elf);
|
||||
void proc_register (struct proc* proc, struct cpu* cpu);
|
||||
void proc_init (void);
|
||||
|
||||
#endif // _KERNEL_PROC_PROC_H
|
||||
|
||||
Reference in New Issue
Block a user