From: Paul H. Hargrove (PHHargrove_at_lbl_dot_gov)
Date: Mon Jul 14 2008 - 12:17:35 PDT
Hongjia Cao wrote:
> Since LinuxThreads will not be supported any more, should we block all
> signals
> for the callback handling thread?
> If signals are not blocked, unexpected signal behavior may occur if
> sigwait if used to wait for signals.
>
Hongjia Cao,
Thanks for the suggestion. If I understand what you are asking, then
the answer is probably YES. However, I first want to be certain that I
do understand correctly by asking a few questions:
1) Am I correct in thinking you are taking about the following lines in
libcr/cr_async.c?
// Reduce false wake-ups by blocking all signals.
#if 0 // DISABLED - when blocking signals LinuxThreads are slow to
terminate
sigset_t mask;
sigfillset(&mask);
pthread_sigmask(SIG_SETMASK, &mask, NULL);
#endif
2) Am I correct in thinking you are concerned that sigwait() from one
thread may fail to receive the expected signal if BLCR's internal thread
receives it instead?
3) Are there any problems in the current signal behavior, other than
sigwait(), that you are aware of?
Thanks,
-Paul
--
Paul H. Hargrove PHHargrove_at_lbl_dot_gov
Future Technologies Group
HPC Research Department Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory Fax: +1-510-486-6900