aboutsummaryrefslogtreecommitdiff
path: root/kernel/features/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/features/proc.c')
-rw-r--r--kernel/features/proc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/features/proc.c b/kernel/features/proc.c
index f6e1fe6..b43b800 100644
--- a/kernel/features/proc.c
+++ b/kernel/features/proc.c
@@ -40,6 +40,13 @@ void scheduler(struct regs *regs)
/* proc_print(); */
memcpy(regs, &current->regs, sizeof(struct regs));
+ if (current->event) {
+ // TODO: Modify and backup EIP
+ printf("Event %d for %d\n", current->event, current->pid);
+ // TODO: Clear bit after resolve
+ current->event = 0;
+ }
+
if (regs->cs != GDT_USER_CODE_OFFSET) {
regs->gs = GDT_USER_DATA_OFFSET;
regs->fs = GDT_USER_DATA_OFFSET;
@@ -65,6 +72,11 @@ void proc_print()
printf("\n");
}
+struct proc *proc_current()
+{
+ return current;
+}
+
void proc_attach(struct proc *proc)
{
if (!last->next) {