aboutsummaryrefslogtreecommitdiff
path: root/include/apos/tcb.h
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-10-21 16:06:00 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2022-10-21 16:06:00 +0300
commita06dbb8a63d825ebb1ad65372ce1ce1f572891bc (patch)
tree342f74db0777a76eed64830ded71db16399e983d /include/apos/tcb.h
parent00d3ae26dfd7c91c0817e71d71636982680d0b28 (diff)
downloadkmi-a06dbb8a63d825ebb1ad65372ce1ce1f572891bc.tar.gz
kmi-a06dbb8a63d825ebb1ad65372ce1ce1f572891bc.zip
initial spawn implementation
Diffstat (limited to 'include/apos/tcb.h')
-rw-r--r--include/apos/tcb.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/apos/tcb.h b/include/apos/tcb.h
index 63bf037..a31e308 100644
--- a/include/apos/tcb.h
+++ b/include/apos/tcb.h
@@ -75,6 +75,9 @@ enum tcb_notify {
/** Thread control block. Main way to handle threads. */
struct tcb {
+ /** Execution continuation point. Important that it is first. */
+ vm_t exec;
+
/** Arch-specific data. */
struct arch_tcbd tcbd;
@@ -319,4 +322,12 @@ stat_t clone_rpc_maps(struct tcb *r);
*/
stat_t alloc_stacks(struct tcb *t);
+/**
+ * Set address to jump to when returning to userspace.
+ *
+ * @param t Thread return address to set.
+ * @param r Address to jump to.
+ */
+void set_return(struct tcb *t, vm_t r);
+
#endif /* APOS_TCB_H */