[ECOS] sigwait not returning
Thu Jan 30 17:46:00 GMT 2003
We tried delivering the signal to a sigwait () call:
*) Using alarm () function --- Working.
*) pthread_kill () function --- Working.
It looks like only in the case of timer_create () case, the sigwait
is not returning.
We traced the call and found that in the following piece of code,
signal_sigwait condition variable's queue is empty.
So it is not calling the broadcast method which will wake the
It is releasing the thread, and in next POSIX_ASR call, the
cyg_deliver_signals function is calling _exit because there
is no signal handler registered for this thread.
All these functions are getting called only if i unmask the signal
in the thread before calling the sigwait.
Otherwise the check in the alarm_action function whether thread is
accepting this signal will fail.
Are we on the right path of debugging?
sigaddset( &sig_pending, signo );
// Wake up any threads in sigsuspend() and sigwait().
cyg_posix_pthread_release_thread( &sig_pending );
>> Try this instead:
>> pthread_sigmask (SIG_BLOCK, &set, (sigset_t*)NULL);
> I had tried this before. It didn't work.
> So i tried to unblock all the signals in the thread itself.
> If i don't do this, in alarm_action () function, the check whether any
> thread is waiting for the signal is failing and
> it is simply returning.
= Suresh N., Research Engineer, C-DoT, Bangalore. =
= Call me at : OFF: 2383951(Dir) / 2263399 (268) RES: 3334248 =
= Alternate email : firstname.lastname@example.org =
= QOT: Modern man is the missing link between apes and human beings.
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss