From: "Robert P. J. Day" <rpjday@mindspring.com>
To: Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: why do both kobjects and ksets have a "kobj_type" member?
Date: Sun, 3 Dec 2006 12:25:13 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.64.0612031217470.4903@localhost.localdomain> (raw)
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
reply other threads:[~2006-12-03 17:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0612031217470.4903@localhost.localdomain \
--to=rpjday@mindspring.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®