From: Albert Cahalan <acahalan@gmail.com>
To: Kyle Moffett <mrmacman_g4@mac.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: anon unions are cool
Date: Sun, 22 Jan 2006 20:17:21 -0500 [thread overview]
Message-ID: <787b0d920601221717v460283eclc72380ae541d7fef@mail.gmail.com> (raw)
In-Reply-To: <5AB1D65D-8F03-4CDF-9847-D75143EC0A9C@mac.com>
On 1/22/06, Kyle Moffett <mrmacman_g4@mac.com> wrote:
> On Jan 22, 2006, at 19:36, Albert Cahalan wrote:
> > For example, suppose we wanted to rename a badly-named struct
> > member. If the struct is used all over the kernel, this becomes a
> > giant project with huge potential for patch conflicts.
>
> Actually, pure struct-member renames are not that common, however it
> _is_ common to add an accessor method due to upcoming locking/
> virtualization changes or similar. For that case (Using a random
> recent example from the list. This was decided to not be the best
> route for pid virtualization, but it's just an example):
>
> struct task_struct {
> [...]
>
> pid_t pid;
>
> [...]
> };
This case is rather interesting. At more than one place I've worked,
I found people assuming that the kernel's "pid" was a pid, when in
fact it is a tid. (a "task ID" or "thread ID") The confusion probably
leads to kernel bugs. I've seen many bugs related to this, though I
can't be 100% sure that they don't all involve code that existed prior
to the tgid concept.
next prev parent reply other threads:[~2006-01-23 1:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-23 0:36 Albert Cahalan
2006-01-23 0:56 ` Kyle Moffett
2006-01-23 1:17 ` Albert Cahalan [this message]
2006-01-23 18:25 ` Eric W. Biederman
2006-01-24 3:39 ` Albert Cahalan
2006-01-24 6:04 ` Kyle Moffett
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=787b0d920601221717v460283eclc72380ae541d7fef@mail.gmail.com \
--to=acahalan@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mrmacman_g4@mac.com \
/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®