From 608f44306a6f0d5692f5c81bcbfe7a621ec254ba Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 5 Jul 2024 21:02:52 +0300 Subject: implement bkl + Start out using big kernel lock, apparently seL4 thinks its good enough. I might have a go at using a more fair lock, and possibly moving to more fine-grained locks if I really feel the need to get scalability up. --- src/ipi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/ipi.c') diff --git a/src/ipi.c b/src/ipi.c index d00ba1c..eed3895 100644 --- a/src/ipi.c +++ b/src/ipi.c @@ -3,6 +3,7 @@ #include #include +#include #include #include @@ -33,14 +34,19 @@ void unqueue_ipi(struct tcb *t) void handle_ipi() { + bkl_lock(); + struct tcb *t = cur_tcb(); adjust_ipi(t); struct queue_head *q = queue_pop(&fifo); - if (!q) + if (!q) { + bkl_unlock(); return; + } struct tcb *r = container_of(q, struct tcb, ipi_queue); notify(r, 0); /* notify didn't take for whatever reason so return whence we came from */ + bkl_unlock(); } -- cgit v1.3