From 7ad9c01dad7b1b46eced8290b8b991383d648188 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Mon, 1 Jul 2024 23:34:57 +0300 Subject: expand notifications into interrupt handlers + Terminology is still a bit poor, and will still have to write documentation + implement ipis properly --- src/ipi.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/ipi.c') 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 #include -#include #include +#include /** * @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 */ } -- cgit v1.3