aboutsummaryrefslogtreecommitdiff
path: root/include/apos
diff options
context:
space:
mode:
Diffstat (limited to 'include/apos')
-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;
};
/**