Partial exec, environment variables
This commit is contained in:
@@ -212,6 +212,18 @@ void proc_register (struct proc* proc, struct cpu* register_cpu, struct reschedu
|
||||
rctx_insert_cpu (rctx, cpu);
|
||||
}
|
||||
|
||||
void proc_register_partial (struct proc* proc) {
|
||||
uint64_t fpt, fp;
|
||||
|
||||
spin_lock (&proc_tree_lock, &fpt);
|
||||
spin_lock (&proc->lock, &fp);
|
||||
|
||||
rbtree_insert (struct proc, &proc_tree, &proc->proc_tree_link, proc_tree_link, pid);
|
||||
|
||||
spin_unlock (&proc->lock, fp);
|
||||
spin_unlock (&proc_tree_lock, fpt);
|
||||
}
|
||||
|
||||
/* caller holds cpu->lock */
|
||||
static struct proc* proc_find_sched (struct cpu* cpu) {
|
||||
uint64_t fp;
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
/* process states */
|
||||
#define PROC_READY 0
|
||||
#define PROC_SUSPENDED 1
|
||||
#define PROC_PARTIAL 2
|
||||
|
||||
/* process flags */
|
||||
#define PROC_USTK_PREALLOC (1 << 0)
|
||||
@@ -61,6 +62,8 @@ struct elf_aux proc_load_segments (struct proc* proc, uint8_t* elf);
|
||||
|
||||
void proc_register (struct proc* proc, struct cpu* register_cpu, struct reschedule_ctx* rctx);
|
||||
|
||||
void proc_register_partial (struct proc* proc);
|
||||
|
||||
struct proc* proc_find_pid (int pid);
|
||||
|
||||
struct proc* proc_from_file (struct proc* proc1, const char* volume, const char* path,
|
||||
|
||||
Reference in New Issue
Block a user