obj: add header-offset field to object_type
this allows the object header to be placed anywhere within the larger object structure. the object system now also ensures that the object is zero-initialised during allocation.
This commit is contained in:
@@ -58,6 +58,7 @@ static kern_status_t set_get_child_named(struct object *obj, const char *name, s
|
||||
static struct object_type set_type = {
|
||||
.ob_name = "set",
|
||||
.ob_size = sizeof(struct set),
|
||||
.ob_header_offset = offsetof(struct set, s_base),
|
||||
.ob_ops = {
|
||||
.query_name = set_query_name,
|
||||
.get_named = set_get_child_named,
|
||||
|
||||
Reference in New Issue
Block a user