diff options
Diffstat (limited to 'include/kpl/type.h')
| -rw-r--r-- | include/kpl/type.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/kpl/type.h b/include/kpl/type.h index b068080..5003cf0 100644 --- a/include/kpl/type.h +++ b/include/kpl/type.h @@ -32,3 +32,22 @@ typedef struct { kpl_value value; int64_t tag; } kpl_result; + +typedef struct _kpl_task kpl_task; + +typedef struct _kpl_env kpl_env; + +typedef void kpl_task_fn(kpl_task *task, kpl_env *env); + +typedef struct _kpl_task { + struct _kpl_task *_Atomic next, *join; + kpl_task_fn *task_fn; + int32_t io_res; + uint32_t io_flags; + int32_t thread_id; + _Atomic bool canceled __attribute__((aligned(4))), join_ready __attribute__((aligned(8))); + kpl_result result; + // TODO TASK ARGUMENTS +} kpl_task; + + |
