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
> 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.


Thanks,
Roland

-
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.087 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site