diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-05 21:02:52 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-05 21:02:52 +0300 |
| commit | 608f44306a6f0d5692f5c81bcbfe7a621ec254ba (patch) | |
| tree | 72a9f917694be91e4795bd04fddabac8139e1059 /src/ipi.c | |
| parent | bef6a76b602eee8f43c2e7dd65c5bd9cf5d909e4 (diff) | |
| download | kmi-608f44306a6f0d5692f5c81bcbfe7a621ec254ba.tar.gz kmi-608f44306a6f0d5692f5c81bcbfe7a621ec254ba.zip | |
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.
Diffstat (limited to 'src/ipi.c')
| -rw-r--r-- | src/ipi.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -3,6 +3,7 @@ #include <kmi/notify.h> #include <kmi/queue.h> +#include <kmi/bkl.h> #include <kmi/ipi.h> #include <arch/proc.h> @@ -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(); } |
