* why do both kobjects and ksets have a "kobj_type" member?
@ 2006-12-03 17:25 Robert P. J. Day
0 siblings, 0 replies; only message in thread
From: Robert P. J. Day @ 2006-12-03 17:25 UTC (permalink / raw)
To: Linux kernel mailing list
what is the rationale for both the kobject structs and the kset
structs having a kobj_type? can those values possibly be different?
from kobject.h:
...
* kset - a set of kobjects of a specific type, belonging
* to a specific subsystem.
*
* All kobjects of a kset should be embedded in an identical
* type.
...
so that suggests that the types can't be *different* within a single
kset. furthermore, we have:
...
static inline struct kobj_type * get_ktype(struct kobject * k)
{
if (k->kset && k->kset->ktype)
return k->kset->ktype;
else
return k->ktype;
}
...
which seem to clearly show that the ktype of the kset overrides that
of the kobject, unless the kset *has* no ktype, or the kobject is not
even a member of a kset. are either of those situations possible?
just being inordinately curious.
rday
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-12-03 17:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-03 17:25 why do both kobjects and ksets have a "kobj_type" member? Robert P. J. Day
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®