From: Pedro Alves <palves@redhat.com>
To: Yuri Gribov <tetra2005@gmail.com>, Yury Gribov <y.gribov@samsung.com>
Cc: gdb-patches@sourceware.org, Stan Shebs <stanshebs@google.com>,
Paul Pluzhnikov <ppluzhnikov@google.com>
Subject: Re: [PATCH][PING][PR gdb/19361] Fix invalid comparison functions
Date: Wed, 30 Dec 2015 21:25:00 -0000 [thread overview]
Message-ID: <56844BE3.9030508@redhat.com> (raw)
In-Reply-To: <CAJOtW+7zb01iC7y4unfo6vVPN2z4_eHoD7xn93f-9tRfy7ffag@mail.gmail.com>
On 12/30/2015 08:18 PM, Yuri Gribov wrote:
> Sorry, I should have been more wordy about the actual problem. With
> current approach i.e.
>
> if (pid1 == pgid1)
> return -1;
> else if (pid2 == pgid2)
> return 1;
>
> comparison of two group leaders is not going to be symmetric:
>
> cmp(lead_1, lead_2) == cmp(lead_2, lead_1) == -1
Aaaaaaah, d'oh! Thanks, it's obvious now, yes, we fail to consider
the case of both elements being leaders. I couldn't see that
even after staring at the code for a while. That hunk is OK as
is then. (Please clarify this in the commit log.)
Thanks,
Pedro Alves
next prev parent reply other threads:[~2015-12-30 21:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-15 11:51 [PATCH][PR " Yury Gribov
2015-12-29 7:31 ` [PATCH][PING][PR " Yury Gribov
2015-12-29 17:27 ` Pedro Alves
2015-12-29 18:09 ` Yury Gribov
2015-12-30 20:18 ` Yuri Gribov
2015-12-30 21:25 ` Pedro Alves [this message]
2015-12-30 21:35 ` Pedro Alves
2016-01-02 2:18 ` Yuri Gribov
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=56844BE3.9030508@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=ppluzhnikov@google.com \
--cc=stanshebs@google.com \
--cc=tetra2005@gmail.com \
--cc=y.gribov@samsung.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