diff options
| author | nodist <kevin.comas.git@gmail.com> | 2026-11-11 14:05:59 -0500 |
|---|---|---|
| committer | nodist <kevin.comas.git@gmail.com> | 2026-11-11 14:05:59 -0500 |
| commit | 75c8828d804f45cf8f44af73bfe87e0f3eaf9a9e (patch) | |
| tree | 2fdf51906d2517bbe8c928fc52f95bb2e0dda4f9 /include/kpl/object.h | |
| parent | 7b9204a8680539bc4795a14f3d9a34e47981d0c3 (diff) | |
run a task test
Diffstat (limited to 'include/kpl/object.h')
| -rw-r--r-- | include/kpl/object.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/kpl/object.h b/include/kpl/object.h index 933b459..5566b00 100644 --- a/include/kpl/object.h +++ b/include/kpl/object.h @@ -13,14 +13,14 @@ typedef enum : uint16_t { // for atomic linked list queue // size in bytes, index on the kpl_threads array // Flags should only be set by owner thread -#define KPL_OBJECT_GC_HEADER(STRUCT_NAME) \ +#define KPL_OBJECT_ALLOCATOR_HEADER(STRUCT_NAME) \ struct STRUCT_NAME *_Atomic queue_next; \ int32_t object_size; \ uint16_t thread_id, object_flags; // Each object can access the object_gc it is a child of #define KPL_OBJECT_HEADER(STRUCT_NAME) \ - KPL_OBJECT_GC_HEADER(STRUCT_NAME); \ + KPL_OBJECT_ALLOCATOR_HEADER(STRUCT_NAME); \ kpl_object_gc *object_gc_parent; /* @@ -71,7 +71,7 @@ void *kpl_object_queue_dequeue(kpl_object_queue *object_queue); * Any thread can mark */ typedef struct _kpl_object_gc { - KPL_OBJECT_GC_HEADER(_kpl_object_gc); + KPL_OBJECT_ALLOCATOR_HEADER(_kpl_object_gc); struct _kpl_object_gc *gc_prev, *gc_next; _Atomic bool gc_mark __attribute((aligned(8))); kpl_class class; @@ -160,7 +160,7 @@ typedef struct _kpl_object_error { int32_t error_line; } kpl_object_error; -typedef kpl_object_error *kpl_task_fn(kpl_thread *thread, kpl_object_task *task); +typedef void kpl_task_fn(kpl_thread *thread, kpl_object_task *object_task); /* * Max variables per task, a bit mask used to check if the variable can be garbage collected |
