diff options
| author | Ada Christine <adachristine18@gmail.com> | 2026-05-23 15:08:09 +0000 |
|---|---|---|
| committer | Ada Christine <adachristine18@gmail.com> | 2026-05-23 15:08:09 +0000 |
| commit | bcf31cb0ae9edc136de6e6069bfefbd8f144e5d9 (patch) | |
| tree | dbc88987f956b72cae372dce7bfda6f244d10145 /kc/core/task.h | |
| parent | 6fbb95277b736e3f271c9586a59a500f2a5ba48a (diff) | |
thread waiting works now
Diffstat (limited to 'kc/core/task.h')
| -rw-r--r-- | kc/core/task.h | 8 |
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); |
