aboutsummaryrefslogtreecommitdiff
path: root/include/arch
diff options
context:
space:
mode:
Diffstat (limited to 'include/arch')
-rw-r--r--include/arch/cpu.h7
-rw-r--r--include/arch/proc.h21
2 files changed, 28 insertions, 0 deletions
diff --git a/include/arch/cpu.h b/include/arch/cpu.h
index 66d5d45..c5a83d5 100644
--- a/include/arch/cpu.h
+++ b/include/arch/cpu.h
@@ -36,4 +36,11 @@ id_t cpu_id();
*/
void cpu_assign(struct tcb *t);
+/**
+ * Send inter-processor interrupt to cpu \p cpu_id.
+ *
+ * @param cpu_id CPU to send ipi to.
+ */
+void cpu_send_ipi(id_t cpu_id);
+
#endif /* APOS_CPU_H */
diff --git a/include/arch/proc.h b/include/arch/proc.h
index 5047eab..d01674d 100644
--- a/include/arch/proc.h
+++ b/include/arch/proc.h
@@ -49,6 +49,27 @@ struct sys_ret get_args(struct tcb *t);
void set_thread(struct tcb *t);
/**
+ * Copy registers from tcb save area to address \p p.
+ * Intended to be used for copying thread state to rpc stack.
+ *
+ * @param t Thread whose registers to save.
+ * @param p Address to save to.
+ */
+void save_regs(struct tcb *t, void *p);
+
+/**
+ * Copy registers from address \p p to tcb save registers.
+ * Intended to be used for copying thread state from rpc stack.
+ *
+ * @param p Address to load from.
+ * @param t Thread whose registers to load.
+ */
+void load_regs(void *p, struct tcb *t);
+
+void adjust_ipi(struct tcb *t);
+void adjust_syscall(struct tcb *t);
+
+/**
* Run \c init program.
*
* @param t Thread that \c init is attached to.