lkml.org 
[lkml]   [2006]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectwhy do both kobjects and ksets have a "kobj_type" member?

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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-12-03 18:33    [W:0.063 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site