[<prev] [next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0612031217470.4903@localhost.localdomain>
Date: Sun, 3 Dec 2006 12:25:13 -0500 (EST)
From: "Robert P. J. Day" <rpjday@...dspring.com>
To: Linux kernel mailing list <linux-kernel@...r.kernel.org>
Subject: why 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists