Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@gnat.com>
To: gdb-patches@sources.redhat.com
Subject: A couple of comments about the nptl patch (minor)
Date: Wed, 04 Jun 2003 22:18:00 -0000	[thread overview]
Message-ID: <20030604221815.GS926@gnat.com> (raw)

Hello,

I'm reading Jeff's patch regarding support for NPTL, and have a couple
of comments/questions... It's really minor...

> static int tkill_failed;

This could be moved inside kill_lwp. Something like the following.
I would also explicitely set it to zero but this is maybe already
guaranteed by the language?

> #ifdef HAVE_TKILL_SYSCALL
>   if (!tkill_failed)
>     {
        static int tkill_failed = 0;
>       int ret = syscall (__NR_tkill, lwpid, signo);
>       if (errno != ENOSYS)
>         return ret;
>       errno = 0;
>       tkill_failed = 1;
>     }
> #endif

In stop_callback, the gdb_assert for ret to be zero after the call to
kill (or kill_lwp) has been removed. I suppose it is valid for syscall
to return nonzero values ? In that case, is it still necessary to keep
this local variable?

> /* Send a SIGSTOP to LP.  */
> 
> static int
> stop_callback (struct lwp_info *lp, void *data)
> {
>   if (!lp->stopped && !lp->signalled)
>     {
>       int ret;
[...]
>       ret = kill_lwp (GET_LWP (lp->ptid), SIGSTOP);
[...]
>     }

-- 
Joel


             reply	other threads:[~2003-06-04 22:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-04 22:18 Joel Brobecker [this message]
2003-06-04 23:27 ` J. Johnston

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=20030604221815.GS926@gnat.com \
    --to=brobecker@gnat.com \
    --cc=gdb-patches@sources.redhat.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