diff options
Diffstat (limited to 'arch/x86/machine/tcb.h')
-rw-r--r-- | arch/x86/machine/tcb.h | 15 |
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 */ |