summaryrefslogtreecommitdiff
path: root/arch/x86/machine/tcb.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2013-03-11 00:15:39 +0100
committerRichard Braun <rbraun@sceen.net>2013-03-11 00:15:39 +0100
commit59550d5c2fa1e9f5dcec20a4ae444afe923ca1c1 (patch)
tree078a9517057c93014ef1b2453723cecb927a2c6f /arch/x86/machine/tcb.h
parent661109c3a36d71bb7b4f9ceb71398f2bd9f8ebda (diff)
x86/{tcb,trap}: implement rescheduling IPIs
Diffstat (limited to 'arch/x86/machine/tcb.h')
-rw-r--r--arch/x86/machine/tcb.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/x86/machine/tcb.h b/arch/x86/machine/tcb.h
index 8bf6a00..886237e 100644
--- a/arch/x86/machine/tcb.h
+++ b/arch/x86/machine/tcb.h
@@ -24,6 +24,7 @@
#include <kern/assert.h>
#include <kern/macros.h>
#include <machine/cpu.h>
+#include <machine/lapic.h>
#include <machine/trap.h>
/*
@@ -80,4 +81,18 @@ tcb_switch(struct tcb *prev, struct tcb *next)
tcb_context_switch(prev, next);
}
+/*
+ * Send a rescheduling interrupt to a remote processor.
+ */
+static inline void
+tcb_send_reschedule(unsigned int cpu)
+{
+ lapic_ipi_send(cpu, TRAP_RESCHEDULE);
+}
+
+/*
+ * Interrupt handler for rescheduling requests.
+ */
+void tcb_reschedule_intr(struct trap_frame *frame);
+
#endif /* _X86_TCB_H */