obj: object header is no longer allocated automatically
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
#include <socks/cpu.h>
|
||||
#include <socks/libc/stdio.h>
|
||||
|
||||
#define TASK_CAST(p) OBJECT_C_CAST(struct task, t_base, &task_type, p)
|
||||
|
||||
static struct object_type task_type = {
|
||||
.ob_name = "task",
|
||||
.ob_size = sizeof(struct task),
|
||||
@@ -144,7 +146,7 @@ struct task *task_alloc(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct task *t = object_data(task_obj);
|
||||
struct task *t = TASK_CAST(task_obj);
|
||||
memset(t, 0x00, sizeof *t);
|
||||
return t;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user