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:
@@ -33,6 +33,7 @@ static kern_status_t ns_get_child_named(struct object *obj, const char *name, st
|
||||
static struct object_type ns_type = {
|
||||
.ob_name = "namespace",
|
||||
.ob_size = sizeof(struct object_namespace),
|
||||
.ob_header_offset = offsetof(struct object_namespace, ns_base),
|
||||
.ob_ops = {
|
||||
.query_name = ns_query_name,
|
||||
.get_named = ns_get_child_named,
|
||||
|
||||
Reference in New Issue
Block a user