lkml.org 
[lkml]   [2004]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] posix timers using == instead of & for bitmask tests
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.032 / U:15.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site