summaryrefslogtreecommitdiff
path: root/kc/core/task.h
diff options
context:
space:
mode:
Diffstat (limited to 'kc/core/task.h')
-rw-r--r--kc/core/task.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/kc/core/task.h b/kc/core/task.h
index eae38bb..5d9f39f 100644
--- a/kc/core/task.h
+++ b/kc/core/task.h
@@ -10,6 +10,7 @@ enum kc_thread_status
RUNNING,
SLEEPING,
BLOCKED,
+ WAITING,
TERMINATED
};
@@ -27,10 +28,15 @@ struct kc_thread
union kc_thread_result result;
enum kc_thread_status status;
struct kc_thread *next;
- uint64_t sleep_expiration;
+ union
+ {
+ uint64_t sleep_expiration;
+ struct kc_thread *wait_target;
+ };
};
void task_init(void);
void kct_terminate(union kc_thread_result result);
+union kc_thread_result kct_wait(struct kc_thread *target);