diff options
Diffstat (limited to 'kernel/features')
-rw-r--r-- | kernel/features/load.c | 1 | ||||
-rw-r--r-- | kernel/features/proc.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/kernel/features/load.c b/kernel/features/load.c index f79e6b4..9024c82 100644 --- a/kernel/features/load.c +++ b/kernel/features/load.c @@ -12,6 +12,7 @@ void proc_load(struct proc *proc, void *data) proc->regs.ebp = (u32)stack; proc->regs.useresp = (u32)stack; proc->regs.eip = (u32)data; + proc->entry = (u32)data; } int bin_load(const char *path, struct proc *proc) diff --git a/kernel/features/proc.c b/kernel/features/proc.c index 48bde72..35c0fa7 100644 --- a/kernel/features/proc.c +++ b/kernel/features/proc.c @@ -162,6 +162,8 @@ void proc_yield(struct regs *r) void proc_enable_waiting(u32 id, enum proc_wait_type type) { struct proc *proc_bak = proc_current(); + if (!proc_bak) + return; struct node *iterator = proc_list->head; while (iterator) { |