public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Shaya Potter <spotter@cs.columbia.edu>
To: linux-kernel@vger.kernel.org
Subject: bug in sys_getpid() comment?
Date: 26 Sep 2002 23:21:25 -0400	[thread overview]
Message-ID: <1033096884.5495.8.camel@zaphod> (raw)

this is sys_getpid() on 2.4.19

asmlinkage long sys_getpid(void)
{
        /* This is SMP safe - current->pid doesn't change */
        return current->tgid;
}

I assume we are returning tgid so that no matter what thread of a
multithreaded program calls getpid we return the same value, and that
the comment with pid is old and should have been updated when it was
changed to return tgid.  A student in my Operating Systems class pointed
this out, so I figured no harm in pointing the possible bug out.

thanks,

shaya


             reply	other threads:[~2002-09-27  3:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-27  3:21 Shaya Potter [this message]
2002-09-27  3:45 ` bug in sys_getpid() comment? Robert Love

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=1033096884.5495.8.camel@zaphod \
    --to=spotter@cs.columbia.edu \
    --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