aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-09-23 01:03:34 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2022-09-23 01:03:34 +0300
commit54df2c4c0a61c03cba268e45e0fd85bf2a7e564b (patch)
tree35cf4d489e20bb0819dd453579a83cd3dd28b587 /include
parent12bfd21818b7a90887dd4c6a92817b791fdb7600 (diff)
downloadkmi-54df2c4c0a61c03cba268e45e0fd85bf2a7e564b.tar.gz
kmi-54df2c4c0a61c03cba268e45e0fd85bf2a7e564b.zip
add notify_state to tcb
Diffstat (limited to 'include')
-rw-r--r--include/apos/tcb.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/apos/tcb.h b/include/apos/tcb.h
index 41b5237..72dcc98 100644
--- a/include/apos/tcb.h
+++ b/include/apos/tcb.h
@@ -49,7 +49,7 @@
/* forward declaration */
struct tcb;
-/** Convenience structure for \see tcb. */
+/** Convenience structure for \ref tcb. */
struct tcb_ctx {
/** Virtual address space of context. */
struct vmem *vmem;
@@ -61,6 +61,18 @@ struct tcb_ctx {
struct tcb *prev;
};
+/** Enum for notification states. */
+enum tcb_notify_state {
+ /** Thread has notifcations queued. */
+ NOTIFY_QUEUED,
+
+ /** Thread is running notification handler. */
+ NOTIFY_RUNNING,
+
+ /** Thread is free to be notified. */
+ NOTIFY_WAITING
+};
+
/** Thread control block. Main way to handle threads. */
struct tcb {
/** Arch-specific data. */
@@ -128,6 +140,9 @@ struct tcb {
/** RPC context of thread. */
struct tcb_ctx rpc;
+
+ /** Notifcation state of thread. */
+ enum tcb_notify notify_state;
};
/**