Messages in this thread | | | Date | Fri, 22 Oct 2004 15:03:20 -0700 | From | Roland McGrath <> | Subject | Re: [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/
| |