aboutsummaryrefslogtreecommitdiff
path: root/include/kpl/object.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/kpl/object.h')
-rw-r--r--include/kpl/object.h8
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