aboutsummaryrefslogtreecommitdiff
path: root/src/ipi.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-07-01 23:34:57 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-07-01 23:34:57 +0300
commit7ad9c01dad7b1b46eced8290b8b991383d648188 (patch)
treecd528648af552974b90117efef431659ef5f0cc6 /src/ipi.c
parent9ff67d879b4695e0c9910b7276f3959c005c7b19 (diff)
downloadkmi-7ad9c01dad7b1b46eced8290b8b991383d648188.tar.gz
kmi-7ad9c01dad7b1b46eced8290b8b991383d648188.zip
expand notifications into interrupt handlers
+ Terminology is still a bit poor, and will still have to write documentation + implement ipis properly
Diffstat (limited to 'src/ipi.c')
-rw-r--r--src/ipi.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ipi.c b/src/ipi.c
index 59f9fd1..79b363f 100644
--- a/src/ipi.c
+++ b/src/ipi.c
@@ -1,10 +1,11 @@
/* SPDX-License-Identifier: copyleft-next-0.3.1 */
/* Copyright 2023 Kim Kuparinen < kimi.h.kuparinen@gmail.com > */
+#include <kmi/notify.h>
#include <kmi/ipi.h>
-#include <arch/cpu.h>
#include <arch/proc.h>
+#include <arch/cpu.h>
/**
* @file ipi.c
@@ -30,6 +31,9 @@ void handle_ipi()
struct tcb *t = cur_tcb();
adjust_ipi(t);
- /** @todo use rpc stack */
- set_return(t, t->callback);
+ /** @todo how do we get the target thread? What if multiple threads send
+ * ipis at the same time? */
+ struct tcb *r = NULL;
+ notify(r);
+ /* notify didn't take for whatever reason so return whence we came from */
}