diff options
Diffstat (limited to 'docs/application')
| -rw-r--r-- | docs/application/interface.md | 18 | ||||
| -rw-r--r-- | docs/application/shared.md | 2 | ||||
| -rw-r--r-- | docs/application/testing.md | 4 | ||||
| -rw-r--r-- | docs/application/thread.md | 3 |
4 files changed, 22 insertions, 5 deletions
diff --git a/docs/application/interface.md b/docs/application/interface.md index 5acfba7..e1c947a 100644 --- a/docs/application/interface.md +++ b/docs/application/interface.md @@ -41,10 +41,26 @@ typedef struct { kpl_interface *interflace; } kpl_class; +typedef enum : uint8_t { + KPL_STATUS_ERROR, + KPL_STATUS_VALUE, + KPL_STATUS_NULL, + KPL_STATUS_DONE +} kpl_status; + typedef struct { - any value, info; + any value; + kpl_status status; } kpl_result; +kpl_result kpl_result_error(error *er); + +kpl_result kpl_result_value(any value); + +kpl_result kpl_result_null(void); + +kpl_result kpl_result_done(void); + typdef struct { uint16_t slab_index, array_index; } kpl_ptr; diff --git a/docs/application/shared.md b/docs/application/shared.md index f597d8d..3a3f4f7 100644 --- a/docs/application/shared.md +++ b/docs/application/shared.md @@ -28,7 +28,7 @@ static kpl_mutex shared_head_mutex; ## Mark Task(s) -1. Run gc interface on each task in the queue +1. Run gc interface on each task in the threads queue 2. Increase `shared_threads_makred` 3. If `shared_threads_makred` is equal to `avaiable_threads` schedule sweep task diff --git a/docs/application/testing.md b/docs/application/testing.md index 6e85c6f..2964fae 100644 --- a/docs/application/testing.md +++ b/docs/application/testing.md @@ -19,7 +19,7 @@ FAIL(FAIL_STRING) ```c typedef struct { const char *name; - kpl_error error; + kpl_error *error; } kpl_test; // TODO STORE ERRORS FOR PRINT AT END @@ -29,7 +29,7 @@ typedef struct { #define TEST(NAME) \ _TEST_FN(NAME); \ static void __attribute__((constructor)) _kpl_test_constructor_##NAME(void) { \ - kpl_test _test = { .name = #NAME; .error = nullptr }; \ + kpl_test _test = { .name = #NAME; .error = NULL }; \ kpl_test_fn_##NAME(&test); \ if (_test.error) { \ /* TODO STORE ERROR */ \ diff --git a/docs/application/thread.md b/docs/application/thread.md index d564d20..7ed5cae 100644 --- a/docs/application/thread.md +++ b/docs/application/thread.md @@ -16,7 +16,8 @@ typedef struct _task { kpl_class state[KPL_TASK_STATE_SIZE]; kpl_result result; task_fn *fn; - int32_t thread_id; + uint32_t io_flags; + int32_t io_res, thread_id; int16_t state_length; _Atomic bool join_ready; } task; |
