From: Joe Korty <joe.korty@ccur.com>
To: Roland McGrath <roland@redhat.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] posix timers using == instead of & for bitmask tests
Date: Fri, 22 Oct 2004 22:27:19 -0400 [thread overview]
Message-ID: <20041023022719.GA26057@tsunami.ccur.com> (raw)
In-Reply-To: <200410222203.i9MM3KJG005761@magilla.sf.frob.com>
On Fri, Oct 22, 2004 at 03:03:20PM -0700, Roland McGrath wrote:
> > Make posix-timers do a get_task_struct / put_task_struct if either
> > SIGEV_SIGNAL or SIGEV_THREAD_ID is set. Currently the get/put is done
> > only if both are set.
>
> What is the purpose of this change? The `good_sigevent' check ensures that
> if SIGEV_THREAD_ID is set, then the value is exactly
> SIGEV_SIGNAL|SIGEV_THREAD_ID. In fact, this change has no effect at all
> because SIGEV_SIGNAL is zero. If it weren't, it would have an undesireable
> effect of doing the task_struct refcounting all the time instead of only
> for SIGEV_THREAD_ID. That refcounting is never required in the plain
> SIGEV_SIGNAL case, because the task_struct pointer stored in the
> group_leader, and that is never freed before all the posix-timers data
> structures get cleared out anyway (exit_itimers). It's only required for
> SIGEV_THREAD_ID, where the target thread might have died before the timer
> was next examined.
Hi Roland,
Thanks for answering my mistaken impressions. I saw after I wrote that
SIGEV_SIGNAL == 0 which makes everything work. And I was laboring under
the misconception that SIGEV_SIGNAL and SIGEV_THREAD were mutually exclusive
which isn't true, one always has SIGEV_SIGNAL if SIGEV_THREAD is set.
Regards,
Joe
next prev parent reply other threads:[~2004-10-23 2:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-22 14:39 [PATCH] posix timers using == instead of & for bitmask tests Joe Korty
2004-10-22 22:03 ` Roland McGrath
2004-10-23 2:27 ` Joe Korty [this message]
2004-10-23 2:50 ` Roland McGrath
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=20041023022719.GA26057@tsunami.ccur.com \
--to=joe.korty@ccur.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@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